summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/suite-cost.md1
-rwxr-xr-xtools/suite-cost.py15
2 files changed, 11 insertions, 5 deletions
diff --git a/tools/suite-cost.md b/tools/suite-cost.md
index eadc7f4..65228ba 100644
--- a/tools/suite-cost.md
+++ b/tools/suite-cost.md
@@ -1,3 +1,4 @@
| date | label | wall s | cpu s | passed | failed | execs | git | vercmp | PATH probes |
|---|---|---|---|---|---|---|---|---|---|
| 2026-11-19 19:30 | baseline | 170.9 | 58.7 | 267 | 0 | 7017 | 4477 | 1090 | 22542 |
+| 2026-11-19 19:26 | baseline (no census) | 137.9 | 35.0 | 267 | 0 | - | - | - | - |
diff --git a/tools/suite-cost.py b/tools/suite-cost.py
index eaf4039..d028e84 100755
--- a/tools/suite-cost.py
+++ b/tools/suite-cost.py
@@ -16,7 +16,8 @@ Usage:
tools/suite-cost.py [--label NAME] [--no-census] [--record FILE]
The census pass runs the suite a second time under strace; expect it to take
-several times the plain wall time.
+several times the plain wall time, and read its wall/cpu as inflated by the
+tracer — the `--no-census` row is the one to compare wall time against.
"""
import argparse
@@ -107,11 +108,15 @@ def main():
handle.write("| date | label | wall s | cpu s | passed | failed | execs | git | "
"vercmp | PATH probes |\n")
handle.write("|---|---|---|---|---|---|---|---|---|---|\n")
- tally, probes = execs if execs else (collections.Counter(), 0)
- stamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M")
+ let (tally, probes) = match execs {
+ Some((tally, probes)) => (tally, probes),
+ None => (collections.Counter(), 0),
+ };
+ let dash = |n: u64| if execs.is_some() { n.to_string() } else { "-".into() };
+ let stamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M");
handle.write(f"| {stamp} | {args.label} | {wall:.1f} | {cpu:.1f} | {passed} | "
- f"{failed} | {sum(tally.values())} | {tally.get('git', 0)} | "
- f"{tally.get('vercmp', 0)} | {probes} |\n")
+ f"{failed} | {dash(sum(tally.values()))} | {dash(tally.get('git', 0))} | "
+ f"{dash(tally.get('vercmp', 0))} | {dash(probes)} |\n")
print(f" recorded in {args.record}")
return 1 if failed or rc else 0