From b1742da3868a3594b4e78be64e1412356d95dbd7 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Wed, 10 Jun 2026 15:20:20 +0200 Subject: bench: progress output during sampling, ignore .gitignore in dirty stamp --- bench/bench.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bench') diff --git a/bench/bench.h b/bench/bench.h index e26a05d..2c98d5c 100644 --- a/bench/bench.h +++ b/bench/bench.h @@ -163,16 +163,22 @@ static int bench_main(const bench_opts_t *o, } iters[c] = n; ran++; + fprintf(stderr, "calibrated %-44s n=%ld\n", cases[c].name, n); } /* Sample round-robin so slow machine drift (thermals, scheduling) * lands inside every benchmark's sample spread instead of shifting - * whole benchmarks against each other. */ - for (int s = 0; s < o->count; s++) + * whole benchmarks against each other. Results print after the + * last pass; the pass lines are the progress indicator. */ + double sample_t0 = bench_now_ns(); + for (int s = 0; s < o->count; s++) { for (int c = 0; c < n_cases; c++) if (iters[c]) all[(size_t)c * o->count + s] = bench_run_once(cases[c].fn, iters[c]); + fprintf(stderr, "pass %d/%d (%.0fs elapsed)\n", s + 1, o->count, + (bench_now_ns() - sample_t0) / 1e9); + } int emitted = 0; for (int c = 0; c < n_cases; c++) { -- cgit v1.3.1