benches: Added stack/heap measurements to bench_wt

Might as well, we have the hooks already.

The only annoying this is these extra probes clutter up the `make
bench-marks` output, so split into two separate rules:

- make bench-marks
- make bench-usage

It's tempting to add disk usage as well (we have bench_helper_usage for
this purpose), but I'm not sure how to measure usage in bench_wt_seq
since it's constantly truncating.
This commit is contained in:
Christopher Haster
2026-02-05 15:32:56 -06:00
parent c641bac80a
commit 81a9c34c8b
2 changed files with 67 additions and 0 deletions
+32
View File
@@ -82,6 +82,14 @@ code = '''
// report the amount we managed to write
BENCH_STOP("write", written);
// report the total stack/heap usage after the benchmark
#ifdef BENCH_YES_STACK
BENCH_RESULT("stack", written, BENCH_STACK());
#endif
#ifdef BENCH_YES_HEAP
BENCH_RESULT("heap", written, BENCH_HEAP());
#endif
lfs3_unmount(&lfs3) => 0;
'''
@@ -129,6 +137,14 @@ code = '''
// report the amount we managed to write
BENCH_STOP("write", written);
// report the total stack/heap usage after the benchmark
#ifdef BENCH_YES_STACK
BENCH_RESULT("stack", written, BENCH_STACK());
#endif
#ifdef BENCH_YES_HEAP
BENCH_RESULT("heap", written, BENCH_HEAP());
#endif
lfs3_unmount(&lfs3) => 0;
'''
@@ -196,6 +212,14 @@ code = '''
// report the amount we managed to write
BENCH_STOP("write", written);
// report the total stack/heap usage after the benchmark
#ifdef BENCH_YES_STACK
BENCH_RESULT("stack", written, BENCH_STACK());
#endif
#ifdef BENCH_YES_HEAP
BENCH_RESULT("heap", written, BENCH_HEAP());
#endif
lfs3_unmount(&lfs3) => 0;
'''
@@ -253,6 +277,14 @@ code = '''
// report the amount we managed to write
BENCH_STOP("write", written);
// report the total stack/heap usage after the benchmark
#ifdef BENCH_YES_STACK
BENCH_RESULT("stack", written, BENCH_STACK());
#endif
#ifdef BENCH_YES_HEAP
BENCH_RESULT("heap", written, BENCH_HEAP());
#endif
lfs3_unmount(&lfs3) => 0;
'''