7e307f2160
These were copied from external benchmarks, and tweaked/simplified a bit based on gained experience. I mostly just wanted something to test the bench runner/scripts, with bench_rbyd showcasing a low-level litmus benchmark, and bench_wt showcasing a high-level throughput benchmark. Though bench_wt has proven to be a _very_ versatile benchmark, and will likely be the first stop for getting an understanding of high-level performance implications. --- Also added bench_helpers.h/c, which includes a couple helper functions: - bench_helpers_warmup - Warm up the filesystem by writing a 1 block file 2*block_count times. This is meant to exhaust any preerased state, post-format lookahead buffers, etc. - bench_helpers_usage - Find a tight bound on disk usage. This allocates a bitmap to find the tight bound, unlike lfs3_fs_usage, which is best-effort. However the bitmap is hidden behind BENCH_HEAP_PAUSE to prevent messing with parallel heap measurements.
23 lines
371 B
C
23 lines
371 B
C
/*
|
|
* Some extra bench helpers
|
|
*
|
|
*/
|
|
#ifndef BENCH_HELPERS_H
|
|
#define BENCH_HELPERS_H
|
|
|
|
#include "runners/bench_runner.h"
|
|
|
|
|
|
// warm up the filesystem
|
|
//
|
|
// this writes a 1 block file 2*block_count times to get it into a good
|
|
// state for benchmarking
|
|
int bench_helpers_warmup(lfs3_t *lfs3);
|
|
|
|
|
|
// find tight disk usage
|
|
uintmax_t bench_helpers_usage(lfs3_t *lfs3);
|
|
|
|
|
|
#endif
|