Artifactspublic-v0

ply

main
ply4 git calls175 ms39 KiB2 cachedprotocol v2
38 lines2.0 KiBRaw
1// Scripted storage that stops answering, for the abort cells each pack space runs in its own runner (README: Abort
2// contract: an operation its caller aborts settles `aborted` when the signal fires, not when the storage answers).
3// Nothing here sleeps: a hang is proved by a step counter, not a clock.
4import { rangeFromBytes } from '../src/rangesource.js';
6// `turns` event-loop turns pass while the promise is still pending: 'pending', else 'settled'.
7export const settledWithin = async (promise, turns = 50) => {
8 let state = 'pending';
9 promise.then(() => { state = 'settled'; }, () => { state = 'settled'; });
10 for (let i = 0; i < turns && state === 'pending'; i++) await new Promise(r => setImmediate(r));
11 return state;
12};
14// Read number `at` (0-based) stops answering; earlier reads are served from the bytes. 'never' leaves read() itself
15// pending for ever (the operation is parked at the read), 'stall' opens a range whose first chunk never comes (parked at
16// the stream read). `parked` resolves when the source is in that state; the counters say what it was told afterwards.
17export function stallAt(bytes, at, how) {
18 const real = rangeFromBytes(bytes);
19 const state = { reads: 0, cancelled: 0, aborted: 0 };
20 let reached;
21 const parked = new Promise(r => { reached = r; });
22 return {
23 state, parked, size: bytes.length,
24 read(offset, length, signal) {
25 const i = state.reads++;
26 if (i < at) return real.read(offset, length, signal);
27 signal?.addEventListener('abort', () => { state.aborted++; });
28 if (how === 'never') { reached(); return new Promise(() => {}); }
29 return Promise.resolve({ ok: true, value: new ReadableStream({
30 pull() { reached(); return new Promise(() => {}); },
31 cancel() { state.cancelled++; },
32 }, { highWaterMark: 0 }) });
33 },
34 };
37export const abortedBefore = () => { const ac = new AbortController(); ac.abort(new Error('before')); return ac.signal; };
38export const codeOf = r => (r.ok ? 'ok' : r.error.code);
Diagnostics4 git calls · 175 ms
CallStatusSizeTime0175 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
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-refs200145 B · 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=145
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=145
git.pkt.payload.max=76
git.ls_refs.count=2
git.ls_refs.head=refs/heads/main
fetchblob:none · deepen 1020038 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=38434
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=19912563f540228593df0c489082e5e2508e21e4
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=6
git.pkt.data=4
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=38434
git.pkt.payload.max=38339
git.sideband.band1.bytes=38338
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=63
git.pack.bytes=38338
git.pack.ofs_delta=0
git.pack.ref_delta=8
git.pack.chain.max=8
git.pack.trailer=0bc36ab7adf82d3109177f11f1ea93f1ce071f77
git.pack.full=55
Open pack map
fetch2001011 B171 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=171
git.response.bytes=1011
git.response.cache=MISS
git.response.duration_ms=171
git.fetch.wants=b84aacfcdfbac93c6db4c27af1b3f126c47b3d92
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=1011
git.pkt.payload.max=990
git.sideband.band1.bytes=989
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/ply.git
Ref
refs/heads/main
Commit
19912563f540228593df0c489082e5e2508e21e4
cf-ray
a5e2d7c05cbe14c2
Request
a6e7f71e…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format