From d9d5d09ef3651793bf39c22f40839461978d0b5b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 24 Sep 2026 14:44:10 +0200 Subject: [PATCH 1/4] single: add build time nanoseconds and use them in scan, to get subsecond resolution --- scan.pl | 10 +++++++--- single.sh | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scan.pl b/scan.pl index ce93745..353c5f3 100755 --- a/scan.pl +++ b/scan.pl @@ -912,11 +912,13 @@ sub single { elsif(/^confopts: (.*)/) { push @confopts, $1; } - elsif(/^(.*) configure non-debug/) { + elsif(/^(.*) (\d+|) *configure non-debug/) { $buildstart = $1; + $buildstartns = $2; } - elsif(/^(.*) make -C tests/) { + elsif(/^(.*) (\d+|) *make -C tests/) { $builddone = $1; + $builddone = $2; } elsif(/^structs: (.*)\t(\d+)\t\d*/) { my ($struct, $size) = ($1,$2); @@ -1020,9 +1022,11 @@ sub single { } if($buildstart && $builddone) { - # get the build time + # get the build time in seconds $buildtime{$scan} = `date +%s -d "$builddone"` - `date +%s -d "$buildstart"`; + # then adjust with the nanoseconds, when available: + $buildtime{$scan} += ($buildendns - $buildstartns)//1000000000; } } diff --git a/single.sh b/single.sh index 2cc586c..9a8607f 100755 --- a/single.sh +++ b/single.sh @@ -45,7 +45,7 @@ pahole lib/.libs/libcurl.a -C Curl_easy,Curl_multi,connectdata -s | sed 's/^/str date "$PREF make clean again" make clean >makeclean.log 2>&1 -date "$PREF configure non-debug" +date "$PREF %N configure non-debug" RELOPTS="--enable-unity --disable-shared --enable-ipv6 --with-gssapi --enable-werror --with-nghttp2 --with-openssl --with-ngtcp2 --with-nghttp3 --with-libssh2 --with-test-caddy=$HOME/caddy/caddy_linux_amd64 --enable-ssls-export --enable-httpsrr --with-test-nghttpx=$HOME/build-nghttp2/bin/nghttpx --with-backtrace --enable-ntlm --enable-smb --enable-proxy-http3 --enable-httpsig" ./configure $RELOPTS >>configure.log 2>&1 @@ -54,7 +54,7 @@ echo "confopts: $RELOPTS"; date "$PREF make non-debug" make V=1 -sj20 >>make.log 2>&1 -date "$PREF make -C tests" +date "$PREF %N make -C tests" make -C tests -sj20 >maketests.log 2>&1 date "$PREF curl -V" From fa45c9536240c22f87916a5715da071e6a3255fa Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 24 Sep 2026 14:46:59 +0200 Subject: [PATCH 2/4] use decimals when showing seconds --- scan.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/scan.pl b/scan.pl index 353c5f3..9530796 100755 --- a/scan.pl +++ b/scan.pl @@ -545,6 +545,7 @@ sub mann_kendall_sens_slope { my %unit2dec = ( 'CPU%' => 3, 'nanoseconds' => 2, + 'seconds' => 3, ); sub show { From f8c0576c792b5e8d88db929920cc0d2b7d011358 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 24 Sep 2026 14:48:03 +0200 Subject: [PATCH 3/4] fixup variable names --- scan.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scan.pl b/scan.pl index 9530796..55d5f03 100755 --- a/scan.pl +++ b/scan.pl @@ -919,7 +919,7 @@ sub single { } elsif(/^(.*) (\d+|) *make -C tests/) { $builddone = $1; - $builddone = $2; + $builddonens = $2; } elsif(/^structs: (.*)\t(\d+)\t\d*/) { my ($struct, $size) = ($1,$2); @@ -1027,7 +1027,7 @@ sub single { $buildtime{$scan} = `date +%s -d "$builddone"` - `date +%s -d "$buildstart"`; # then adjust with the nanoseconds, when available: - $buildtime{$scan} += ($buildendns - $buildstartns)//1000000000; + $buildtime{$scan} += ($builddonens - $buildstartns)//1000000000; } } From f7a985b18fce9d0c24820f9472f6b69780aebb2f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 24 Sep 2026 14:51:01 +0200 Subject: [PATCH 4/4] fixups --- scan.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scan.pl b/scan.pl index 55d5f03..1fcf872 100755 --- a/scan.pl +++ b/scan.pl @@ -913,11 +913,11 @@ sub single { elsif(/^confopts: (.*)/) { push @confopts, $1; } - elsif(/^(.*) (\d+|) *configure non-debug/) { + elsif(/^(.?*) (\d+|) *configure non-debug/) { $buildstart = $1; $buildstartns = $2; } - elsif(/^(.*) (\d+|) *make -C tests/) { + elsif(/^(.?*) (\d+|) *make -C tests/) { $builddone = $1; $builddonens = $2; } @@ -1027,7 +1027,7 @@ sub single { $buildtime{$scan} = `date +%s -d "$builddone"` - `date +%s -d "$buildstart"`; # then adjust with the nanoseconds, when available: - $buildtime{$scan} += ($builddonens - $buildstartns)//1000000000; + $buildtime{$scan} += ($builddonens - $buildstartns) / 1000000000; } }