Codebergdnkl

foot

master
ply5 git calls495 ms25 KiB3 cachedprotocol v2
211 lines5.5 KiBRaw
1#pragma once
3#define PASTE(a, b) a##b
4#define XPASTE(a, b) PASTE(a, b)
5#define STRLEN(str) (sizeof("" str "") - 1)
6#define DO_PRAGMA(x) _Pragma(#x)
7#define VERCMP(x, y, cx, cy) ((cx > x) || ((cx == x) && (cy >= y)))
9#if defined(__GNUC__) && defined(__GNUC_MINOR__)
10 #define GNUC_AT_LEAST(x, y) VERCMP(x, y, __GNUC__, __GNUC_MINOR__)
11#else
12 #define GNUC_AT_LEAST(x, y) 0
13#endif
15#if defined(__clang_major__) && defined(__clang_minor__)
16 #define CLANG_AT_LEAST(x, y) VERCMP(x, y, __clang_major__, __clang_minor__)
17#else
18 #define CLANG_AT_LEAST(x, y) 0
19#endif
21#ifdef __has_attribute
22 #define HAS_ATTRIBUTE(x) __has_attribute(x)
23#else
24 #define HAS_ATTRIBUTE(x) 0
25#endif
27#ifdef __has_builtin
28 #define HAS_BUILTIN(x) __has_builtin(x)
29#else
30 #define HAS_BUILTIN(x) 0
31#endif
33#ifdef __has_include
34 #define HAS_INCLUDE(x) __has_include(x)
35#else
36 #define HAS_INCLUDE(x) 0
37#endif
39#ifdef __has_feature
40 #define HAS_FEATURE(x) __has_feature(x)
41#else
42 #define HAS_FEATURE(x) 0
43#endif
45// __has_extension() is a Clang macro used to determine if a feature is
46// available even if not standardized in the current "-std" mode.
47#ifdef __has_extension
48 #define HAS_EXTENSION(x) __has_extension(x)
49#else
50 // Clang versions prior to 3.0 only supported __has_feature()
51 #define HAS_EXTENSION(x) HAS_FEATURE(x)
52#endif
54#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(unused) || defined(__TINYC__)
55 #define UNUSED __attribute__((__unused__))
56#else
57 #define UNUSED
58#endif
60#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(const)
61 #define CONST __attribute__((__const__))
62#else
63 #define CONST
64#endif
66#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(malloc)
67 #define MALLOC __attribute__((__malloc__))
68#else
69 #define MALLOC
70#endif
72#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(constructor)
73 #define CONSTRUCTOR __attribute__((__constructor__))
74 #define HAVE_ATTR_CONSTRUCTOR 1
75#else
76 #define CONSTRUCTOR
77#endif
79#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(destructor)
80 #define DESTRUCTOR __attribute__((__destructor__))
81#else
82 #define DESTRUCTOR
83#endif
85#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(format)
86 #define PRINTF(x) __attribute__((__format__(__printf__, (x), (x + 1))))
87 #define VPRINTF(x) __attribute__((__format__(__printf__, (x), 0)))
88#else
89 #define PRINTF(x)
90 #define VPRINTF(x)
91#endif
93#if (GNUC_AT_LEAST(3, 0) || HAS_BUILTIN(__builtin_expect)) && defined(__OPTIMIZE__)
94 #define likely(x) __builtin_expect(!!(x), 1)
95 #define unlikely(x) __builtin_expect(!!(x), 0)
96#else
97 #define likely(x) (x)
98 #define unlikely(x) (x)
99#endif
101#if GNUC_AT_LEAST(3, 1) || HAS_ATTRIBUTE(noinline)
102 #define NOINLINE __attribute__((__noinline__))
103#else
104 #define NOINLINE
105#endif
107#if GNUC_AT_LEAST(3, 1) || HAS_ATTRIBUTE(always_inline)
108 #define ALWAYS_INLINE __attribute__((__always_inline__))
109#else
110 #define ALWAYS_INLINE
111#endif
113#if GNUC_AT_LEAST(3, 3) || HAS_ATTRIBUTE(nonnull)
114 #define NONNULL_ARGS __attribute__((__nonnull__))
115 #define NONNULL_ARG(...) __attribute__((__nonnull__(__VA_ARGS__)))
116#else
117 #define NONNULL_ARGS
118 #define NONNULL_ARG(...)
119#endif
121#if GNUC_AT_LEAST(3, 4) || HAS_ATTRIBUTE(warn_unused_result)
122 #define WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
123#else
124 #define WARN_UNUSED_RESULT
125#endif
127#if GNUC_AT_LEAST(4, 1) || HAS_ATTRIBUTE(flatten)
128 #define FLATTEN __attribute__((__flatten__))
129#else
130 #define FLATTEN
131#endif
133#if GNUC_AT_LEAST(4, 3) || HAS_ATTRIBUTE(hot)
134 #define HOT __attribute__((__hot__))
135#else
136 #define HOT
137#endif
139#if GNUC_AT_LEAST(4, 3) || HAS_ATTRIBUTE(cold)
140 #define COLD __attribute__((__cold__))
141#else
142 #define COLD
143#endif
145#if GNUC_AT_LEAST(4, 5) || HAS_BUILTIN(__builtin_unreachable)
146 #define UNREACHABLE() __builtin_unreachable()
147#else
148 #define UNREACHABLE()
149#endif
151#if GNUC_AT_LEAST(5, 0) || HAS_ATTRIBUTE(returns_nonnull)
152 #define RETURNS_NONNULL __attribute__((__returns_nonnull__))
153#else
154 #define RETURNS_NONNULL
155#endif
157#if HAS_ATTRIBUTE(diagnose_if)
158 #define DIAGNOSE_IF(x) __attribute__((diagnose_if((x), (#x), "error")))
159#else
160 #define DIAGNOSE_IF(x)
161#endif
163#define XMALLOC MALLOC RETURNS_NONNULL WARN_UNUSED_RESULT
164#define XSTRDUP XMALLOC NONNULL_ARGS
166#if __STDC_VERSION__ >= 201112L
167 #define noreturn _Noreturn
168#elif GNUC_AT_LEAST(3, 0)
169 #define noreturn __attribute__((__noreturn__))
170#else
171 #define noreturn
172#endif
174#if CLANG_AT_LEAST(3, 6)
175 #define UNROLL_LOOP(n) DO_PRAGMA(clang loop unroll_count(n))
176#elif GNUC_AT_LEAST(8, 0)
177 #define UNROLL_LOOP(n) DO_PRAGMA(GCC unroll (n))
178#else
179 #define UNROLL_LOOP(n)
180#endif
182#ifdef __COUNTER__
183 // Supported by GCC 4.3+ and Clang
184 #define COUNTER_ __COUNTER__
185#else
186 #define COUNTER_ __LINE__
187#endif
189#if defined(_DEBUG) && defined(HAVE_ATTR_CONSTRUCTOR)
190 #define UNITTEST static void CONSTRUCTOR XPASTE(unittest_, COUNTER_)(void)
191#else
192 #define UNITTEST static void UNUSED XPASTE(unittest_, COUNTER_)(void)
193#endif
195#ifdef __clang__
196 #define IGNORE_WARNING(wflag) \
197 DO_PRAGMA(clang diagnostic push) \
198 DO_PRAGMA(clang diagnostic ignored "-Wunknown-pragmas") \
199 DO_PRAGMA(clang diagnostic ignored "-Wunknown-warning-option") \
200 DO_PRAGMA(clang diagnostic ignored wflag)
201 #define UNIGNORE_WARNINGS DO_PRAGMA(clang diagnostic pop)
202#elif GNUC_AT_LEAST(4, 6)
203 #define IGNORE_WARNING(wflag) \
204 DO_PRAGMA(GCC diagnostic push) \
205 DO_PRAGMA(GCC diagnostic ignored "-Wpragmas") \
206 DO_PRAGMA(GCC diagnostic ignored wflag)
207 #define UNIGNORE_WARNINGS DO_PRAGMA(GCC diagnostic pop)
208#else
209 #define IGNORE_WARNING(wflag)
210 #define UNIGNORE_WARNINGS
211#endif
Diagnostics5 git calls · 495 ms
CallStatusSizeTime0495 ms
discover200178 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=178
git.server.agent=git/2.56.1-Linux
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch server-option object-format
git.server.fetch=shallow wait-for-done filter
git.protocol.version=2
git.pkt.frames=9
git.pkt.data=7
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=178
git.pkt.payload.max=35
ls-refs20010 KiB468 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=406
git.response.bytes=10322
git.response.cache=EXPIRED
git.response.duration_ms=465
git.protocol.version=2
git.pkt.frames=108
git.pkt.data=107
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=10322
git.pkt.payload.max=106
git.ls_refs.count=107
git.ls_refs.head=refs/heads/master
fetchtree:0 · deepen 102009.3 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=9489
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
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=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=9489
git.pkt.payload.max=9389
git.sideband.band1.bytes=9389
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=10
git.pack.bytes=9389
git.pack.ofs_delta=0
git.pack.ref_delta=0
git.pack.chain.max=0
git.pack.trailer=de930681b6073ba5b599a0f956bfbd114762ad5a
git.pack.full=10
Open pack map
fetchtree:02003.6 KiB · hit5 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=5
git.response.bytes=3708
git.response.cache=HIT
git.response.duration_ms=5
git.fetch.filter=tree:0
git.fetch.wants=96f1228f4004ebd74530c7f0aea264108eff425f
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=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=3708
git.pkt.payload.max=3681
git.sideband.band1.bytes=3681
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=1
git.pack.bytes=3681
git.pack.trailer=731a22f61f25bdfdca1691647f2056631bcfdcf1
Open pack map
fetch2001.5 KiB · hit20 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=20
git.response.bytes=1495
git.response.cache=HIT
git.response.duration_ms=20
git.fetch.wants=2ecda603e1775b4e0c3a67e700cd250d50d0a1e0
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=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1495
git.pkt.payload.max=1468
git.sideband.band1.bytes=1468
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://codeberg.org/dnkl/foot
Ref
refs/heads/master
Commit
c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
cf-ray
a5e1468cbbcca140
Request
e81674cc…
Protocol
v2 · sha1
Agent
git/2.56.1-Linux
Filter
advertised
Fetch
shallow wait-for-done filter
Capabilities
agent ls-refs fetch server-option object-format