master
1#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9# Copyright (C) Marc Hoersken, <info@marc-hoersken.de>
10#
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.
14#
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.
18#
19# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20# KIND, either express or implied.
21#
22# SPDX-License-Identifier: curl
23#
24###########################################################################
26package appveyor;
28use strict;
29use warnings;
31BEGIN {
32 use base qw(Exporter);
34 our @EXPORT = qw(
35 appveyor_check_environment
36 appveyor_create_test_result
37 appveyor_update_test_result
38 );
39}
41my %APPVEYOR_TEST_NAMES; # JSON and shell-quoted test names by test number
43sub appveyor_check_environment {
44 if(defined $ENV{'APPVEYOR_API_URL'} && $ENV{'APPVEYOR_API_URL'}) {
45 return 1;
46 }
47 return 0;
48}
50sub appveyor_create_test_result {
51 my ($curl, $testnum, $testname) = @_;
52 $testname =~ s/\\/\\\\/g;
53 $testname =~ s/\"/\\\"/g;
54 $testname =~ s/\'/'"'"'/g;
55 local $ENV{CURL_MEMDEBUG};
56 delete $ENV{CURL_MEMDEBUG};
57 my $appveyor_baseurl = $ENV{'APPVEYOR_API_URL'};
58 my $appveyor_result = qx($curl --silent --noproxy '*' \\
59 --header 'Content-Type: application/json' \\
60 --data '
61 {
62 "testName": "$testname",
63 "testFramework": "runtests.pl",
64 "fileName": "tests/data/test$testnum",
65 "outcome": "Running"
66 }
67 ' \\
68 '$appveyor_baseurl/api/tests');
69 print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
70 $APPVEYOR_TEST_NAMES{$testnum} = $testname;
71}
73sub appveyor_update_test_result {
74 my ($curl, $testnum, $error, $start, $stop) = @_;
75 my $testname = $APPVEYOR_TEST_NAMES{$testnum};
76 if(!defined $testname) {
77 return;
78 }
79 if(!defined $stop) {
80 $stop = $start;
81 }
82 my $appveyor_duration = sprintf("%.0f", ($stop - $start) * 1000);
83 my $appveyor_outcome;
84 my $appveyor_category;
85 if($error == 2) {
86 $appveyor_outcome = 'Ignored';
87 $appveyor_category = 'Error';
88 }
89 elsif($error < 0) {
90 $appveyor_outcome = 'NotRunnable';
91 $appveyor_category = 'Warning';
92 }
93 elsif(!$error) {
94 $appveyor_outcome = 'Passed';
95 $appveyor_category = 'Information';
96 }
97 else {
98 $appveyor_outcome = 'Failed';
99 $appveyor_category = 'Error';
100 }
101 local $ENV{CURL_MEMDEBUG};
102 delete $ENV{CURL_MEMDEBUG};
103 my $appveyor_baseurl = $ENV{'APPVEYOR_API_URL'};
104 my $appveyor_result = qx($curl --silent --noproxy '*' --request PUT \\
105 --header 'Content-Type: application/json' \\
106 --data '
107 {
108 "testName": "$testname",
109 "testFramework": "runtests.pl",
110 "fileName": "tests/data/test$testnum",
111 "outcome": "$appveyor_outcome",
112 "durationMilliseconds": $appveyor_duration,
113 "ErrorMessage": "Test $testnum $appveyor_outcome"
114 }
115 ' \\
116 '$appveyor_baseurl/api/tests');
117 print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
118 if($appveyor_category eq 'Error') {
119 local $ENV{CURL_MEMDEBUG};
120 delete $ENV{CURL_MEMDEBUG};
121 $appveyor_result = qx($curl --silent --noproxy '*' \\
122 --header 'Content-Type: application/json' \\
123 --data '
124 {
125 "message": "$appveyor_outcome: $testname",
126 "category": "$appveyor_category",
127 "details": "Test $testnum $appveyor_outcome"
128 }
129 ' \\
130 '$appveyor_baseurl/api/build/messages');
131 print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
132 }
133}
1351;
Diagnostics4 git calls · 25 ms
CallStatusSizeTime025 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 · 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=149 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=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=86Open pack map
fetch2001.4 KiB · hit20 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=20 git.response.bytes=1476 git.response.cache=HIT git.response.duration_ms=20 git.fetch.wants=dcd5fe02222aa2deb45bd3276d4b963789100194 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=1476 git.pkt.payload.max=1455 git.sideband.band1.bytes=1454 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
- a5ea3edf1c21fc85
- Request
- 811ceca6…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format