Artifactspublic-v0

ply

main
ply4 git calls403 ms39 KiB1 cachedprotocol v2
108 lines4.8 KiBRaw
1// version:refname (issue #124). Two products, both judged by `git tag -l --sort=version:refname`.
2//
3// Pairs: every unordered pair of names from left × mid × end, plus a unicode slice, under every versionsort.suffix
4// list. A cell is one pair under one list. The oracle is two-name git, which is versioncmp. A suffix list that puts
5// the release between prereleases makes versioncmp cyclic (00.1-gamma < 00.2-alpha < 00.10-alpha < 00.1-gamma), so
6// those cells are pairs, not a listing.
7//
8// Ranks: every name of the larger product under every list. Where versioncmp orders the whole list, git's listing
9// equals a sort by compareVersionRefnames. Where it cycles, the listing inverts at least one cycle edge, and
10// two-name git on that edge agrees with versioncmp.
12/** @type {readonly string[]} */
13export const PAIR_LEFTS = Object.freeze(['0', '00', '1', '2', '10', '01']);
14/** @type {readonly string[]} */
15export const PAIR_MIDS = Object.freeze(['', '.1', '.2', '.10', '.01']);
16/** @type {readonly string[]} */
17export const PAIR_ENDS = Object.freeze(['', '-rc1', '-alpha', '-gamma']);
19/** @type {readonly string[]} */
20export const UNICODE_PREFIXES = Object.freeze(['é', '\uE000', '\u{10000}']);
21/** @type {readonly string[]} */
22export const UNICODE_LEFTS = Object.freeze(['1', '10']);
23/** @type {readonly string[]} */
24export const UNICODE_MIDS = Object.freeze(['', '.1']);
25/** @type {readonly string[]} */
26export const UNICODE_ENDS = Object.freeze(['', '-alpha']);
28/** @type {readonly string[]} */
29export const PREFIXES = Object.freeze(['', 'a', 'b', 'v', 'foo', 'é', '\uE000', '\u{10000}']);
30/** @type {readonly string[]} */
31export const LEFTS = Object.freeze(['0', '00', '1', '2', '9', '10', '01', '99', '100']);
32/** @type {readonly string[]} */
33export const MIDS = Object.freeze(['', '.0', '.1', '.2', '.3', '.6', '.7', '.8', '.9', '.10', '.01']);
34/** @type {readonly string[]} */
35export const ENDS = Object.freeze([
36 '', '-rc1', '-rc2', '-alpha', '-beta', '-gamma', '-delta',
37 '-pre1', '-pre2', '-prerelease1', '-before1', '-after1', '-foo-bar', '-foo-baz', '-unlisted-suffix',
38]);
40// Each list is versionsort.suffix in config order. '' is the release, placed among the suffixes (git's own tests).
41/** @type {readonly { readonly tag: string, readonly suffixes: readonly string[] }[]} */
42export const SUFFIX_CONFIGS = Object.freeze([
43 { tag: 'none', suffixes: [] },
44 { tag: 'rc', suffixes: ['-rc'] },
45 { tag: 'before', suffixes: ['-before'] },
46 { tag: 'before-after', suffixes: ['-before', '-after'] },
47 { tag: 'pre', suffixes: ['-pre', '-prerelease'] },
48 { tag: 'foo-bar', suffixes: ['-bar', '-foo-baz', '-foo-bar'] },
49 { tag: 'release-between', suffixes: ['-alpha', '-beta', '', '-gamma', '-delta'] },
50 { tag: 'release-first', suffixes: ['', '-rc'] },
51 { tag: 'rc-then-release', suffixes: ['-rc', ''] },
52]);
54// versioncmp's order under release-between. The three edges cannot all hold in one listing.
55/** @type {readonly (readonly [string, string])[]} */
56export const CYCLE = Object.freeze([
57 ['00.1-gamma', '00.2-alpha'],
58 ['00.2-alpha', '00.10-alpha'],
59 ['00.10-alpha', '00.1-gamma'],
60]);
61export const CYCLIC_SUFFIX = 'release-between';
63const choose2 = n => (n * (n - 1)) / 2;
65export const PAIR_NAME_COUNT = PAIR_LEFTS.length * PAIR_MIDS.length * PAIR_ENDS.length;
66export const UNICODE_NAME_COUNT = UNICODE_PREFIXES.length * UNICODE_LEFTS.length * UNICODE_MIDS.length * UNICODE_ENDS.length;
67export const PAIR_CELL_COUNT = (choose2(PAIR_NAME_COUNT) + choose2(UNICODE_NAME_COUNT)) * SUFFIX_CONFIGS.length;
68export const NAME_COUNT = PREFIXES.length * LEFTS.length * MIDS.length * ENDS.length;
69export const RANK_CELL_COUNT = NAME_COUNT * SUFFIX_CONFIGS.length;
70export const CELL_COUNT = PAIR_CELL_COUNT + RANK_CELL_COUNT;
72/** @param {readonly string[]} prefixes @param {readonly string[]} lefts @param {readonly string[]} mids @param {readonly string[]} ends */
73export function product(prefixes, lefts, mids, ends) {
74 const out = [];
75 for (const prefix of prefixes) {
76 for (const left of lefts) {
77 for (const mid of mids) {
78 for (const end of ends) out.push(`${prefix}${left}${mid}${end}`);
79 }
80 }
81 }
82 return out;
85/** Every name of the rank product, in axis order. */
86export function names() {
87 return product(PREFIXES, LEFTS, MIDS, ENDS);
90/** The pair-product names (no prefix). */
91export function pairNames() {
92 return product([''], PAIR_LEFTS, PAIR_MIDS, PAIR_ENDS);
95/** The unicode slice of the pair product. */
96export function unicodeNames() {
97 return product(UNICODE_PREFIXES, UNICODE_LEFTS, UNICODE_MIDS, UNICODE_ENDS);
100/** @param {readonly string[]} list */
101export function pairsOf(list) {
102 /** @type {[string, string][]} */
103 const out = [];
104 for (let i = 0; i < list.length; i++) {
105 for (let j = i + 1; j < list.length; j++) out.push([list[i], list[j]]);
106 }
107 return out;
Diagnostics4 git calls · 403 ms
CallStatusSizeTime0403 ms
discover200152 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=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 B3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=145
git.response.cache=UPDATING
git.response.duration_ms=3
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
fetch2001.5 KiB398 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=398
git.response.bytes=1569
git.response.cache=MISS
git.response.duration_ms=398
git.fetch.wants=41a7ce81a88492bdc4611128a19d9c605700db1e
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=1569
git.pkt.payload.max=1548
git.sideband.band1.bytes=1547
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
a5e2b4dcdffccf33
Request
af74ce33…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format