Codebergdnkl

foot

master
ply5 git calls29 ms29 KiB4 cachedprotocol v2
115 lines3.1 KiBRaw
1#pragma once
3#include <stdbool.h>
4#include <uchar.h>
5#include <stddef.h>
6#include <stdarg.h>
7#include <string.h>
8#include <wchar.h>
9#include <wctype.h>
11#if defined(FOOT_GRAPHEME_CLUSTERING)
12 #include <utf8proc.h>
13#endif
15static inline size_t c32len(const char32_t *s) {
16 return wcslen((const wchar_t *)s);
19static inline int c32cmp(const char32_t *s1, const char32_t *s2) {
20 return wcscmp((const wchar_t *)s1, (const wchar_t *)s2);
23static inline int c32ncmp(const char32_t *s1, const char32_t *s2, size_t n) {
24 return wcsncmp((const wchar_t *)s1, (const wchar_t *)s2, n);
27static inline char32_t *c32ncpy(char32_t *dst, const char32_t *src, size_t n) {
28 return (char32_t *)wcsncpy((wchar_t *)dst, (const wchar_t *)src, n);
31static inline char32_t *c32cpy(char32_t *dst, const char32_t *src) {
32 return (char32_t *)wcscpy((wchar_t *)dst, (const wchar_t *)src);
35static inline char32_t *c32ncat(char32_t *dst, const char32_t *src, size_t n) {
36 return (char32_t *)wcsncat((wchar_t *)dst, (const wchar_t *)src, n);
39static inline char32_t *c32cat(char32_t *dst, const char32_t *src) {
40 return (char32_t *)wcscat((wchar_t *)dst, (const wchar_t *)src);
43static inline char32_t *c32dup(const char32_t *s) {
44 return (char32_t *)wcsdup((const wchar_t *)s);
47static inline char32_t *c32chr(const char32_t *s, char32_t c) {
48 return (char32_t *)wcschr((const wchar_t *)s, c);
51static inline int c32casecmp(const char32_t *s1, const char32_t *s2) {
52 return wcscasecmp((const wchar_t *)s1, (const wchar_t *)s2);
55static inline int c32ncasecmp(const char32_t *s1, const char32_t *s2, size_t n) {
56 return wcsncasecmp((const wchar_t *)s1, (const wchar_t *)s2, n);
59static inline char32_t toc32lower(char32_t c) {
60 return (char32_t)towlower((wint_t)c);
63static inline char32_t toc32upper(char32_t c) {
64 return (char32_t)towupper((wint_t)c);
67static inline bool isc32upper(char32_t c32) {
68 return iswupper((wint_t)c32);
71static inline bool isc32space(char32_t c32) {
72 return iswspace((wint_t)c32);
75static inline bool isc32print(char32_t c32) {
76 return iswprint((wint_t)c32);
79static inline bool isc32graph(char32_t c32) {
80 return iswgraph((wint_t)c32);
83static inline bool hasc32upper(const char32_t *s) {
84 for (int i = 0; s[i] != '\0'; i++) {
85 if (isc32upper(s[i])) return true;
86 }
87 return false;
90static inline int c32width(char32_t c) {
91#if defined(FOOT_GRAPHEME_CLUSTERING)
92 return utf8proc_charwidth((utf8proc_int32_t)c);
93#else
94 return wcwidth((wchar_t)c);
95#endif
98static inline int c32swidth(const char32_t *s, size_t n) {
99#if defined(FOOT_GRAPHEME_CLUSTERING)
100 int width = 0;
101 for (size_t i = 0; i < n; i++)
102 width += utf8proc_charwidth((utf8proc_int32_t)s[i]);
103 return width;
104#else
105 return wcswidth((const wchar_t *)s, n);
106#endif
109size_t mbsntoc32(char32_t *dst, const char *src, size_t nms, size_t len);
110char32_t *ambstoc32(const char *src);
111char *ac32tombs(const char32_t *src);
113static inline size_t mbstoc32(char32_t *dst, const char *src, size_t len) {
114 return mbsntoc32(dst, src, strlen(src) + 1, len);
Diagnostics5 git calls · 29 ms
CallStatusSizeTime029 ms
discover200178 B2 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=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 KiB · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=10322
git.response.cache=HIT
git.response.duration_ms=2
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
fetchcombine:blob:none+tree:2 · deepen 12008.6 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=8830
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=combine:blob:none+tree:2
git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
git.fetch.haves.count=0
git.fetch.deepen=1
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=8830
git.pkt.payload.max=8730
git.sideband.band1.bytes=8730
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=14
git.pack.bytes=8730
git.fetch.wide.objects=14
git.fetch.wide.extra_bytes=9909
git.fetch.wide.blobs=0
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=24
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
fetch200725 B · hit25 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=725
git.response.cache=HIT
git.response.duration_ms=25
git.fetch.wants=dcb412ce13455d3edea3e2f421947084ac194ff1
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=725
git.pkt.payload.max=698
git.sideband.band1.bytes=698
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
a5e1837859e13014
Request
0e696ead…
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