runners: bench: Moved bench n to BENCH_STOP
This was a funny issue for external benchmarking, where we've focused mostly on throughput benchmarking so far. The current throughput approach is to run a benchmark for a given simtime, and record the number of bytes written after. This is great for allowing benchmarks to fail gracefully, but doesn't really work with the current bench runner, which expected a known n in BENCH_START. We can work around this by calling BENCH_START/STOP a second time (making a mess of later scripts), but it would be nice if this was fixed in the bench runner. --- Humorously, BENCH_START just stores n to be printed out when BENCH_STOP is called, so this was an easy fix.
This commit is contained in:
@@ -21,11 +21,11 @@ void bench_trace(const char *fmt, ...);
|
||||
|
||||
// BENCH_START/BENCH_STOP macros measure readed/proged/erased bytes
|
||||
// through emubd
|
||||
void bench_start(const char *m, uintmax_t n);
|
||||
void bench_stop(const char *m);
|
||||
void bench_start(const char *m);
|
||||
void bench_stop(const char *m, uintmax_t n);
|
||||
|
||||
#define BENCH_START(m, n) bench_start(m, n)
|
||||
#define BENCH_STOP(m) bench_stop(m)
|
||||
#define BENCH_START(m) bench_start(m)
|
||||
#define BENCH_STOP(m, n) bench_stop(m, n)
|
||||
|
||||
// BENCH_RESULT/BENCH_FRESULT allow for explicit non-io measurements
|
||||
void bench_result(const char *m, uintmax_t n, uintmax_t result);
|
||||
|
||||
Reference in New Issue
Block a user