[repo] Bench: ss in the CI shell and in bench.sh's tool check; no pid found no longer ends the run silently
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"commit": "7473b897dcec81db25a43b90f1bfd32c89070a21",
|
||||
"nixpkgs": "c56a87d8e41ce69bd2af57eb35dcc117a9dfca33",
|
||||
"outputs": {
|
||||
"ianitor": {
|
||||
"narHash": "sha256-hlX5oiJQPTieETbjojaZnPUGcSgPrKqO2vPsr2o2Xok=",
|
||||
"narSize": 24455232,
|
||||
"storePath": "/nix/store/mrq37ldbyn0zg04iwwj22pp05hlpx5y8-ianitor-1.0.0"
|
||||
},
|
||||
"ianitor-web": {
|
||||
"narHash": "sha256-cR8Lq5LNQoQ7xWa40jpjmRybUC8tS9XuXAtojDmCg2c=",
|
||||
"narSize": 598000,
|
||||
"storePath": "/nix/store/vsrm3326zm440gwp17nqg3g3bixb3cmm-ianitor-web-1.0.0"
|
||||
}
|
||||
},
|
||||
"sourceTree": "dd9194c43094dd06b072d3597c1a2f114beda3cf5ed57678a99c979e32d6bb0e",
|
||||
"system": "x86_64-linux",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
@@ -49,6 +49,8 @@
|
||||
h2spec
|
||||
testssl
|
||||
oha
|
||||
# scripts/bench.sh finds each proxy's pid with ss (a NixOS service's PATH has no iproute2)
|
||||
iproute2
|
||||
nodejs_22
|
||||
pnpm_11
|
||||
# the slow-client probes (tests/support/probes)
|
||||
|
||||
+4
-3
@@ -8,7 +8,7 @@
|
||||
# (tests/diff/src/bin/pair.rs) to the same upstream; oha drives each in turn. Results are
|
||||
# committed as data: bench/results/<date>-<label>.csv and the raw oha JSON beside it.
|
||||
#
|
||||
# scripts/bench.sh [label] # needs caddy, oha, jq on PATH
|
||||
# scripts/bench.sh [label] # needs caddy, oha, jq, ss on PATH
|
||||
# nix shell nixpkgs#caddy nixpkgs#oha nixpkgs#jq -c scripts/bench.sh wsl2-ryzen
|
||||
#
|
||||
# Environment: DURATION (each load run, default 20s), SOAK (the soak run, default 300s; 0 skips
|
||||
@@ -23,7 +23,7 @@ duration=${DURATION:-20s}
|
||||
soak=${SOAK:-300}
|
||||
conns=${CONNS:-"1 16 64 256"}
|
||||
profile=${BUILD:-release}
|
||||
for tool in caddy oha jq; do
|
||||
for tool in caddy oha jq ss; do
|
||||
command -v "$tool" >/dev/null || { echo "missing: $tool" >&2; exit 2; }
|
||||
done
|
||||
|
||||
@@ -66,7 +66,8 @@ done
|
||||
# The process to sample for memory: edge runs inside ianitor-pair; each Caddy is a child of it.
|
||||
pid_of() {
|
||||
local port=$1
|
||||
ss -Hltnp "sport = :$port" 2>/dev/null | grep -Eo 'pid=[0-9]+' | head -1 | cut -d= -f2
|
||||
# No pid found is not an error (the row says 0); set -e and pipefail would end the run here, silently.
|
||||
ss -Hltnp "sport = :$port" 2>/dev/null | grep -Eo 'pid=[0-9]+' | head -1 | cut -d= -f2 || true
|
||||
}
|
||||
rss_kb() { awk '/VmRSS/ {print $2}' "/proc/$1/status" 2>/dev/null || echo 0; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user