Artifactspublic-v0

curl

master
ply4 git calls31 ms289 KiB3 cachedprotocol v2
400 lines8.0 KiBRaw
1/***************************************************************************
2 * _ _ ____ _
3 * Project ___| | | | _ \| |
4 * / __| | | | |_) | |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
7 *
8 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9 *
10 * This software is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at https://curl.se/docs/copyright.html.
13 *
14 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 * copies of the Software, and permit persons to whom the Software is
16 * furnished to do so, under the terms of the COPYING file.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 * SPDX-License-Identifier: curl
22 *
23 ***************************************************************************/
25#ifdef HAVE_FCNTL_O_NONBLOCK
26/* headers for FCNTL_O_NONBLOCK test */
27#include <sys/types.h>
28#include <unistd.h>
29#include <fcntl.h>
31#if defined(sun) || defined(__sun__) || \
32 defined(__SUNPRO_C) || defined(__SUNPRO_CC)
33# if defined(__SVR4) || defined(__srv4__)
34# define PLATFORM_SOLARIS
35# else
36# define PLATFORM_SUNOS4
37# endif
38#endif
39#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
40# define PLATFORM_AIX_V3
41#endif
43#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3)
44#error "O_NONBLOCK does not work on this platform"
45#endif
47int main(void)
49 /* O_NONBLOCK source test */
50 int flags = 0;
51 if(fcntl(0, F_SETFL, flags | O_NONBLOCK))
52 return 1;
53 return 0;
55#endif
57/* tests for gethostbyname_r */
58#if defined(HAVE_GETHOSTBYNAME_R_3) || \
59 defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
60 defined(HAVE_GETHOSTBYNAME_R_5) || \
61 defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
62 defined(HAVE_GETHOSTBYNAME_R_6) || \
63 defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
64#include <sys/types.h>
65#include <netdb.h>
66int main(void)
68 static const char address[] = "localhost";
69 struct hostent h;
70 int rc = 0;
71#if defined(HAVE_GETHOSTBYNAME_R_3) || \
72 defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
73 struct hostent_data hdata;
74#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
75 defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
76 defined(HAVE_GETHOSTBYNAME_R_6) || \
77 defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
78 char buffer[8192];
79 struct hostent *hp;
80 int h_errnop;
81#endif
83#if defined(HAVE_GETHOSTBYNAME_R_3) || \
84 defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
85 rc = gethostbyname_r(address, &h, &hdata);
86 (void)hdata;
87#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
88 defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT)
89 rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop);
90 (void)hp;
91 (void)h_errnop;
92#elif defined(HAVE_GETHOSTBYNAME_R_6) || \
93 defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
94 rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop);
95 (void)hp;
96 (void)h_errnop;
97#endif
98 (void)h;
99 (void)rc;
100 return 0;
102#endif
104#ifdef HAVE_BOOL_T
105#ifdef HAVE_SYS_TYPES_H
106#include <sys/types.h>
107#endif
108#ifdef HAVE_STDBOOL_H
109#include <stdbool.h>
110#endif
111int main(void)
113 return (int)sizeof(bool *);
115#endif
117#ifdef HAVE_FILE_OFFSET_BITS
118#include <sys/types.h>
119/* Check that off_t can represent 2**63 - 1 correctly.
120 We cannot define LARGE_OFF_T to be 9223372036854775807,
121 since some C++ compilers masquerading as C compilers
122 incorrectly reject 9223372036854775807. */
123#define LARGE_OFF_T (((off_t)1 << 62) - 1 + ((off_t)1 << 62))
124static int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 &&
125 LARGE_OFF_T % 2147483647 == 1)
126 ? 1 : -1];
127int main(void)
129 (void)off_t_is_large;
130 return 0;
132#endif
134#ifdef HAVE_IOCTLSOCKET
135#ifdef _WIN32
136#include <winsock2.h>
137#endif
138int main(void)
140 /* ioctlsocket source code */
141 int socket = -1;
142 unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
143 (void)flags;
144 return 0;
147#endif
149#ifdef HAVE_IOCTLSOCKET_CAMEL
150#include <proto/bsdsocket.h>
151int main(void)
153 /* IoctlSocket source code */
154 if(IoctlSocket(0, 0, 0))
155 return 1;
156 return 0;
158#endif
160#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
161#include <proto/bsdsocket.h>
162#ifdef HAVE_SYS_IOCTL_H
163#include <sys/ioctl.h>
164#endif
165int main(void)
167 /* IoctlSocket source code */
168 long flags = 0;
169 if(IoctlSocket(0, FIONBIO, &flags))
170 return 1;
171 (void)flags;
172 return 0;
174#endif
176#ifdef HAVE_IOCTLSOCKET_FIONBIO
177#ifdef _WIN32
178#include <winsock2.h>
179#endif
180int main(void)
182 unsigned long flags = 0;
183 if(ioctlsocket(0, FIONBIO, &flags))
184 return 1;
185 (void)flags;
186 return 0;
188#endif
190#ifdef HAVE_IOCTL_FIONBIO
191/* headers for FIONBIO test */
192#ifdef HAVE_SYS_TYPES_H
193#include <sys/types.h>
194#endif
195#ifdef HAVE_UNISTD_H
196#include <unistd.h>
197#endif
198#ifndef _WIN32
199#include <sys/socket.h>
200#endif
201#ifdef HAVE_SYS_IOCTL_H
202#include <sys/ioctl.h>
203#endif
204#ifdef HAVE_STROPTS_H
205#include <stropts.h>
206#endif
207int main(void)
209 int flags = 0;
210 if(ioctl(0, FIONBIO, &flags))
211 return 1;
212 (void)flags;
213 return 0;
215#endif
217#ifdef HAVE_IOCTL_SIOCGIFADDR
218/* headers for SIOCGIFADDR test */
219#ifdef HAVE_SYS_TYPES_H
220#include <sys/types.h>
221#endif
222#ifdef HAVE_UNISTD_H
223#include <unistd.h>
224#endif
225#ifndef _WIN32
226#include <sys/socket.h>
227#endif
228#ifdef HAVE_SYS_IOCTL_H
229#include <sys/ioctl.h>
230#endif
231#ifdef HAVE_STROPTS_H
232#include <stropts.h>
233#endif
234#include <net/if.h>
235int main(void)
237 struct ifreq ifr;
238 if(ioctl(0, SIOCGIFADDR, &ifr))
239 return 1;
240 (void)ifr;
241 return 0;
243#endif
245#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
246#ifdef _WIN32
247#include <winsock2.h>
248#endif
249#ifdef HAVE_SYS_TYPES_H
250#include <sys/types.h>
251#endif
252#ifndef _WIN32
253#include <sys/socket.h>
254#endif
255int main(void)
257 if(setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
258 return 1;
259 return 0;
261#endif
263#ifdef HAVE_GLIBC_STRERROR_R
264#include <string.h>
265#include <errno.h>
267static void check(char c)
269 (void)c;
272int main(void)
274 char buffer[1024];
275 /* This does not compile if strerror_r does not return a char* */
276 /* !checksrc! disable ERRNOVAR 1 */
277 check(strerror_r(EACCES, buffer, sizeof(buffer))[0]);
278 return 0;
280#endif
282#ifdef HAVE_POSIX_STRERROR_R
283#include <string.h>
284#include <errno.h>
286/* Float, because a pointer cannot be implicitly cast to float */
287static void check(float f)
289 (void)f;
292int main(void)
294 char buffer[1024];
295 /* This does not compile if strerror_r does not return an int */
296 /* !checksrc! disable ERRNOVAR 1 */
297 check(strerror_r(EACCES, buffer, sizeof(buffer)));
298 return 0;
300#endif
302#ifdef HAVE_FSETXATTR_6
303#include <sys/xattr.h> /* header from libc, not from libattr */
304int main(void)
306 fsetxattr(0, 0, 0, 0, 0, 0);
307 return 0;
309#endif
311#ifdef HAVE_FSETXATTR_5
312#include <sys/xattr.h> /* header from libc, not from libattr */
313int main(void)
315 fsetxattr(0, "", 0, 0, 0);
316 return 0;
318#endif
320#ifdef HAVE_CLOCK_GETTIME_MONOTONIC
321#include <time.h>
322int main(void)
324 struct timespec ts;
325 (void)clock_gettime(CLOCK_MONOTONIC, &ts);
326 (void)ts;
327 return 0;
329#endif
331#ifdef HAVE_BUILTIN_AVAILABLE
332int main(void)
334 if(__builtin_available(macOS 10.12, iOS 5, *)) {}
335 return 0;
337#endif
339#ifdef HAVE_ATOMIC
340#ifdef HAVE_SYS_TYPES_H
341#include <sys/types.h>
342#endif
343#ifdef HAVE_UNISTD_H
344#include <unistd.h>
345#endif
346#ifdef HAVE_STDATOMIC_H
347#include <stdatomic.h>
348#endif
349int main(void)
351 _Atomic int i = 1;
352 i = 0; /* Force an atomic-write operation. */
353 return i;
355#endif
357#ifdef HAVE_WIN32_WINNT
358#ifdef _WIN32
359#ifndef NOGDI
360#define NOGDI
361#endif
362#include <windows.h>
363#endif
365#define enquote(x) #x
366#define expand(x) enquote(x)
367#pragma message("_WIN32_WINNT=" expand(_WIN32_WINNT))
369int main(void)
371 return 0;
373#endif
375#ifdef MINGW64_VERSION
376#ifdef __MINGW32__
377#include <_mingw.h>
378#endif
380#define enquote(x) #x
381#define expand(x) enquote(x)
382#pragma message("MINGW64_VERSION=" \
383 expand(__MINGW64_VERSION_MAJOR) "." \
384 expand(__MINGW64_VERSION_MINOR))
386int main(void)
388 return 0;
390#endif
392#ifdef HAVE_TIME_T_UNSIGNED
393#include <time.h>
394static int time_t_is_unsigned[((time_t)-1 > 0) ? 1 : -1];
395int main(void)
397 (void)time_t_is_unsigned;
398 return 0;
400#endif
Diagnostics4 git calls · 31 ms
CallStatusSizeTime031 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=26
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2002.4 KiB · hit26 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=2507
git.response.cache=HIT
git.response.duration_ms=26
git.fetch.wants=f6027d0af4f66c3702fe94d6913b21a8d09db0c2
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=2507
git.pkt.payload.max=2486
git.sideband.band1.bytes=2485
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e2ea4b2c884bc2
Request
6f7116bf…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format