Summary
Benchmark targets in the Makefile pipe output through scripts/bench-tx-per-sec.awk to add a TX/sec column. This
can be done natively with Go's b.ReportMetric, which is more accurate for batch benchmarks and eliminates the
external script dependency.
Changes
- Add test.ReportTxPerSecond(b) helper in utils/test/benchmark.go
- Call it from all benchmarks across loadgen/, service/coordinator/, service/vc/, service/sidecar/,
utils/deliverorderer/, and utils/serialization/
- For batch benchmarks (dependency graph, preparer): cap input to exactly b.N transactions so the metric is
accurate
- Remove | awk -f scripts/bench-tx-per-sec.awk from all Makefile bench targets
- Delete scripts/bench-tx-per-sec.awk
Why
- Accuracy: The AWK script computes 1e9/ns_per_op, which gives ops/sec — not tx/sec for batch benchmarks where one
"op" processes multiple transactions. b.ReportMetric reports the true throughput.
- Simplicity: No external script, no pipe — benchmark output includes tx/s natively.
- Consistency: All benchmarks report the same metric from a single helper.
Summary
Benchmark targets in the Makefile pipe output through scripts/bench-tx-per-sec.awk to add a TX/sec column. This
can be done natively with Go's b.ReportMetric, which is more accurate for batch benchmarks and eliminates the
external script dependency.
Changes
utils/deliverorderer/, and utils/serialization/
accurate
Why
"op" processes multiple transactions. b.ReportMetric reports the true throughput.