Codebergdnkl

foot

master
ply5 git calls631 ms29 KiB3 cachedprotocol v2
116 lines2.5 KiBexecutableRaw
1#!/bin/sh
3set -eu
5usage_and_die() {
6 echo "Usage: ${0} none|partial|full-current-session|full-headless-sway|full-headless-cage|[auto] <source-dir> <build-dir> [meson options]"
7 exit 1
8}
10[ ${#} -ge 3 ] || usage_and_die
12mode=${1}
13srcdir=$(realpath "${2}")
14blddir=$(realpath "${3}")
15shift 3
17# if [ -e "${blddir}" ]; then
18# echo "error: ${blddir}: build directory already exists"
19# exit 1
20# fi
22if [ ! -f "${srcdir}"/generate-version.sh ]; then
23 echo "error: ${srcdir}: does not appear to be a foot source directory"
24 exit 1
25fi
27compiler=other
28do_pgo=no
30CFLAGS="${CFLAGS-} -O3"
32case $(${CC-cc} --version) in
33 *Free\ Software\ Foundation*)
34 compiler=gcc
35 do_pgo=yes
36 ;;
38 *clang*)
39 compiler=clang
41 if command -v llvm-profdata > /dev/null; then
42 do_pgo=yes
43 CFLAGS="${CFLAGS} -Wno-ignored-optimization-argument"
44 fi
45 ;;
46esac
48case ${mode} in
49 partial|full-current-session|full-headless-sway|full-headless-cage)
50 ;;
52 none)
53 do_pgo=no
54 ;;
56 auto)
57 if [ -n "${WAYLAND_DISPLAY+x}" ]; then
58 mode=full-current-session
59 elif command -v sway > /dev/null; then
60 mode=full-headless-sway
61 elif command -v cage > /dev/null; then
62 mode=full-headless-cage
63 else
64 mode=partial
65 fi
66 ;;
68 *)
69 usage_and_die
70 ;;
71esac
73set -x
75# echo "source: ${srcdir}"
76# echo "build: ${blddir}"
77# echo "compiler: ${compiler}"
78# echo "mode: ${mode}"
79# echo "CFLAGS: ${CFLAGS}"
81export CFLAGS
82export CCACHE_DISABLE=1
83meson setup --buildtype=release -Db_lto=true "${@}" "${blddir}" "${srcdir}"
85if [ ${do_pgo} = yes ]; then
86 find "${blddir}" \
87 '(' \
88 -name "*.gcda" -o \
89 -name "*.profraw" -o \
90 -name default.profdata \
91 ')' \
92 -delete
94 meson configure "${blddir}" -Db_pgo=generate
95 ninja -C "${blddir}"
97 # If fcft/tllist are subprojects, we need to ensure their tests
98 # have been executed, or we'll get "profile count data file not
99 # found" errors.
100 ninja -C "${blddir}" test
102 # Run mode-dependent script to generate profiling data
103 export LLVM_PROFILE_FILE="${blddir}/default_%m.profraw"
104 "${srcdir}"/pgo/${mode}.sh "${srcdir}" "${blddir}"
106 if [ ${compiler} = clang ]; then
107 llvm-profdata \
108 merge \
109 "${blddir}"/default_*.profraw \
110 --output="${blddir}"/default.profdata
111 fi
113 meson configure "${blddir}" -Db_pgo=use
114fi
116ninja -C "${blddir}"
Diagnostics5 git calls · 631 ms
CallStatusSizeTime0631 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 KiB607 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=607
git.response.bytes=10322
git.response.cache=EXPIRED
git.response.duration_ms=607
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 · 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=8830
git.response.cache=HIT
git.response.duration_ms=3
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 · 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=10
Open pack map
fetch2001.1 KiB · hit21 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=21
git.response.bytes=1102
git.response.cache=HIT
git.response.duration_ms=21
git.fetch.wants=24597c82e63e3da096dd8c4288b3ce511222ce8b
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=1102
git.pkt.payload.max=1075
git.sideband.band1.bytes=1075
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
a5e30dc528c78a31
Request
c588ad02…
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