Artifactspublic-v0

curl

master
ply4 git calls61 ms288 KiB3 cachedprotocol v2
130 lines3.3 KiBexecutableRaw
1#!/usr/bin/env perl
2#***************************************************************************
3# _ _ ____ _
4# Project ___| | | | _ \| |
5# / __| | | | |_) | |
6# | (__| |_| | _ <| |___
7# \___|\___/|_| \_\_____|
8#
9# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
11# This software is licensed as described in the file COPYING, which
12# you should have received as part of this distribution. The terms
13# are also available at https://curl.se/docs/copyright.html.
15# You may opt to use, copy, modify, merge, publish, distribute and/or sell
16# copies of the Software, and permit persons to whom the Software is
17# furnished to do so, under the terms of the COPYING file.
19# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20# KIND, either express or implied.
22# SPDX-License-Identifier: curl
24###########################################################################
26# This script grew out of help from Przemyslaw Iskra and Balint Szilakszi
27# a late evening in the #curl IRC channel.
30use strict;
31use warnings;
33my $curl = shift @ARGV;
34my $opt = shift @ARGV;
35my $txt = shift @ARGV;
37my $longopt;
38my $shortopt;
39if($opt =~ /^--/) {
40 $longopt = $opt;
42else {
43 $shortopt = $opt;
46# first run the help command
47my @curlout; open(O, '-|', $curl, '-h', $opt) or die; push @curlout, <O>; close(O);
49# figure out the short+long option combo using -h all*/
50open(C, '-|', $curl, '-h', 'all');
51if($shortopt) {
52 while(<C>) {
53 if(/^ +$opt, ([^ ]*)/) {
54 $longopt = $1;
55 last;
56 }
57 }
59else {
60 while(<C>) {
61 my $f = $_;
62 if(/ $opt /) {
63 if($f =~ /^ *(-(.)), $longopt/) {
64 $shortopt = $1;
65 }
66 last;
67 }
68 }
70close(C);
72my $fullopt;
73if($shortopt) {
74 $fullopt = "$shortopt, $longopt";
76else {
77 $fullopt = $longopt;
80open(R, "<", $txt);
81my $show = 0;
82my @txtout;
83while(<R>) {
84 if(/^ $fullopt/) {
85 $show = 1;
86 }
87 elsif(/^ -/ && $show) {
88 last;
89 }
90 if($show) {
91 push @txtout, $_;
92 }
94close(R);
96my $error = 0;
97if(scalar(@curlout) != scalar(@txtout)) {
98 printf "curl -h $opt is %d lines, $txt says %d lines\n",
99 scalar(@curlout), scalar(@txtout);
100 $error++;
102else {
103 # same size, compare line by line
104 for my $i (0 .. $#curlout) {
105 # trim CRLF from the data
106 $curlout[$i] =~ s/[\r\n]//g;
107 $txtout[$i] =~ s/[\r\n]//g;
108 if($curlout[$i] ne $txtout[$i]) {
109 printf "Line %d\n", $i;
110 printf "-h : %s (%d bytes)\n", $curlout[$i],
111 length($curlout[$i]);
112 printf "file : %s (%d bytes)\n", $txtout[$i],
113 length($txtout[$i]);
115 if(length($curlout[$i]) == length($txtout[$i])) {
116 my $l = length($curlout[$i]);
117 for my $c (0 .. $l) {
118 my $o = substr($curlout[$i], $c, 1);
119 my $t = substr($txtout[$i], $c, 1);
120 if($o ne $t) {
121 print "-h col %d: %02x\n", $c, ord($o);
122 print "file col %d: %02x\n", $c, ord($t);
123 }
124 }
125 }
126 $error++;
127 }
128 }
130exit $error;
Diagnostics4 git calls · 61 ms
CallStatusSizeTime061 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-refs200149 B · hit3 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=149
git.response.cache=HIT
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=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 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=293470
git.response.cache=HIT
git.response.duration_ms=3
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=31c911efe5652725e930f4d2e60c9060e5f6646d
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=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2001.4 KiB · hit55 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=55
git.response.bytes=1391
git.response.cache=HIT
git.response.duration_ms=55
git.fetch.wants=d13de40be1fd497bd665dd61d2c037d2b56ffd18
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=1391
git.pkt.payload.max=1370
git.sideband.band1.bytes=1369
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/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e2d1542ceacf3a
Request
79ce4b5a…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format