diff options
| author | hwspeedy <ns@bigbear.dk> | 2024-03-18 15:23:17 +0100 | 
|---|---|---|
| committer | hwspeedy <ns@bigbear.dk> | 2024-03-18 15:23:17 +0100 | 
| commit | 15436018a0f6038dcce36f696298356cf3a58ca4 (patch) | |
| tree | 32af5dbb51fb0643015ce2856d7eaa3bbed74d02 /modules | |
| parent | 7419044152310684c363e38b26aa4b655cdedc95 (diff) | |
FIX rerun benchmark if not done/stopped
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/benchmark/benches.c | 8 | 
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; | 
