Codebergdnkl
foot
master
1#include "debug.h"
3#include <errno.h>
4#include <stdarg.h>
5#include <stdio.h>
6#include <stdlib.h>
7#include <string.h>
8#include "log.h"
10#if defined(__SANITIZE_ADDRESS__) || HAS_FEATURE(address_sanitizer)
11#include <sanitizer/asan_interface.h>
12#define ASAN_ENABLED 1
13#endif
15static void
16print_stack_trace(void)
17{
18#ifdef ASAN_ENABLED
19 fputs("\nStack trace:\n", stderr);
20 __sanitizer_print_stack_trace();
21#endif
22}
24noreturn void
25fatal_error(const char *file, int line, const char *msg, int err)
26{
27 log_msg(LOG_CLASS_ERROR, "debug", file, line, "%s: %s", msg, strerror(err));
28 print_stack_trace();
29 fflush(stderr);
30 abort();
31}
33noreturn void
34bug(const char *file, int line, const char *func, const char *fmt, ...)
35{
36 char buf[4096];
37 va_list ap;
38 va_start(ap, fmt);
39 int n = vsnprintf(buf, sizeof(buf), fmt, ap);
40 va_end(ap);
42 const char *msg = likely(n >= 0) ? buf : "??";
43 log_msg(LOG_CLASS_ERROR, "debug", file, line, "BUG in %s(): %s", func, msg);
44 print_stack_trace();
45 fflush(stderr);
46 abort();
47}
Diagnostics5 git calls · 891 ms
CallStatusSizeTime0891 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 KiB867 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=852 git.response.bytes=10322 git.response.cache=EXPIRED git.response.duration_ms=864 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 · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=9489 git.response.cache=HIT git.response.duration_ms=3 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=10Open pack map
fetchtree:02003.6 KiB · hit4 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=4 git.response.bytes=3708 git.response.cache=HIT git.response.duration_ms=4 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=731a22f61f25bdfdca1691647f2056631bcfdcf1Open pack map
fetch200541 B · hit17 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=16 git.response.bytes=541 git.response.cache=HIT git.response.duration_ms=17 git.fetch.wants=8a86e9df16605495e2b66ad5687307ca37731936 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=541 git.pkt.payload.max=514 git.sideband.band1.bytes=514 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
- a5e133737b67a9fe
- Request
- 4b94462e…
- 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