aboutsummaryrefslogtreecommitdiff
path: root/modules/benchmark/benches.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/benchmark/benches.c')
-rw-r--r--modules/benchmark/benches.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/benchmark/benches.c b/modules/benchmark/benches.c
index 0b57ac1c..efa0985d 100644
--- a/modules/benchmark/benches.c
+++ b/modules/benchmark/benches.c
@@ -28,7 +28,9 @@ gchar *CN() { \
#define BENCH_SCAN_SIMPLE(SN, BF, BID) \
void SN(gboolean reload) { \
- SCAN_START(); \
+ static gboolean scanned = FALSE; \
+ if (reload || bench_results[BID].result<=0.0) scanned = FALSE; \
+ if (scanned) return; \
do_benchmark(BF, BID); \
SCAN_END(); \
}
@@ -60,7 +62,9 @@ BENCH_SIMPLE(BENCHMARK_MEMORY_ALL, "SysBench Memory (Multi-thread)", benchmark_m
BENCH_CALLBACK(callback_gui, "GPU Drawing", BENCHMARK_GUI, 1);
void scan_gui(gboolean reload)
{
- SCAN_START();
+ static gboolean scanned = FALSE;
+ if (reload || bench_results[BID].result<=0.0) scanned = FALSE;
+ if (scanned) return;
bench_value er = EMPTY_BENCH_VALUE;