From 590da61f2e3fbcdb7493485f3e2ea359ccc0ac89 Mon Sep 17 00:00:00 2001 From: bigbear Date: Thu, 8 Feb 2024 03:13:01 +0100 Subject: FIX new benchmarks working for slow & fast machines --- modules/benchmark/sysbench.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/benchmark/sysbench.c') diff --git a/modules/benchmark/sysbench.c b/modules/benchmark/sysbench.c index 97a05229..5c45831d 100644 --- a/modules/benchmark/sysbench.c +++ b/modules/benchmark/sysbench.c @@ -176,9 +176,13 @@ sysbench_failed: } void benchmark_memory_run(int threads, int result_index) { + int cpu_procs, cpu_cores, cpu_threads, cpu_nodes; + + cpu_procs_cores_threads_nodes(&cpu_procs, &cpu_cores, &cpu_threads, &cpu_nodes); + struct sysbench_ctx ctx = { .test = "memory", - .threads = threads, + .threads = threads>0 ? threads : cpu_threads, .parms_test = "", .r = EMPTY_BENCH_VALUE}; @@ -214,6 +218,7 @@ void benchmark_memory_run(int threads, int result_index) { void benchmark_memory_single(void) { benchmark_memory_run(1, BENCHMARK_MEMORY_SINGLE); } void benchmark_memory_dual(void) { benchmark_memory_run(2, BENCHMARK_MEMORY_DUAL); } void benchmark_memory_quad(void) { benchmark_memory_run(4, BENCHMARK_MEMORY_QUAD); } +void benchmark_memory_all(void) { benchmark_memory_run(0, BENCHMARK_MEMORY_ALL); } void benchmark_sbcpu_single(void) { struct sysbench_ctx ctx = { -- cgit v1.2.3