benches: Added disk usage measurements to bench_wt

Note bench_wt_seq's disk usage is garbage because of the repeated
truncates!

But I figured this is at least useful for the other benches, and we
already have bench_helper_usage. Maybe in the future we'll figure out
some way to get useful disk usage from bench_wt_seq.
This commit is contained in:
Christopher Haster
2026-02-05 15:47:42 -06:00
parent 81a9c34c8b
commit a914057407
+18
View File
@@ -90,6 +90,12 @@ code = '''
BENCH_RESULT("heap", written, BENCH_HEAP());
#endif
// find the total disk usage after the benchmark
//
// note this is garbage because of the above truncates!
uintmax_t usage = bench_helpers_usage(&lfs3);
BENCH_RESULT("usage", written, usage);
lfs3_unmount(&lfs3) => 0;
'''
@@ -145,6 +151,10 @@ code = '''
BENCH_RESULT("heap", written, BENCH_HEAP());
#endif
// find the total disk usage after the benchmark
uintmax_t usage = bench_helpers_usage(&lfs3);
BENCH_RESULT("usage", written, usage);
lfs3_unmount(&lfs3) => 0;
'''
@@ -220,6 +230,10 @@ code = '''
BENCH_RESULT("heap", written, BENCH_HEAP());
#endif
// find the total disk usage after the benchmark
uintmax_t usage = bench_helpers_usage(&lfs3);
BENCH_RESULT("usage", written, usage);
lfs3_unmount(&lfs3) => 0;
'''
@@ -285,6 +299,10 @@ code = '''
BENCH_RESULT("heap", written, BENCH_HEAP());
#endif
// find the total disk usage after the benchmark
uintmax_t usage = bench_helpers_usage(&lfs3);
BENCH_RESULT("usage", written, usage);
lfs3_unmount(&lfs3) => 0;
'''