~kdsch/sampler

5e8871821eeebf8aad835891dc6744a59e65cd23 — Karl Schultheisz 1 year, 1 month ago fed5213
posix/benchmark: add benchmark_app_proc_play

This differentiates it from benchmark_app_proc_idle, which is what the
old benchmark did, so the old benchmark gets a new name.
2 files changed, 15 insertions(+), 3 deletions(-)

M posix/benchmark/main.c
M posix/benchmark/meson.build
M posix/benchmark/main.c => posix/benchmark/main.c +14 -2
@@ 5,7 5,7 @@
#define run(fn) bm_run(#fn, fn)

static void
benchmark_app_proc(uint32_t iterations)
benchmark_app_proc_idle(uint32_t iterations)
{
	struct app app;
	app_init(&app);


@@ 15,6 15,17 @@ benchmark_app_proc(uint32_t iterations)
	}
}

static void
benchmark_app_proc_play(uint32_t iterations)
{
	struct app app;
	app_init(&app);
	seq_start(&app.seq);

	for (uint32_t i = 0; i < iterations; i++) {
		app_proc(&app);
	}
}
static float
clock_now()
{


@@ 51,6 62,7 @@ bm_run(const char *name, void (*func)(uint32_t iterations))
int
main(void)
{
	run(benchmark_app_proc);
	run(benchmark_app_proc_idle);
	run(benchmark_app_proc_play);
	return 0;
}

M posix/benchmark/meson.build => posix/benchmark/meson.build +1 -1
@@ 16,4 16,4 @@ benchmark = executable(
	native: true,
)

benchmark('benchmark-pure', benchmark)
benchmark('benchmark-pure', benchmark, verbose: true)