Răsfoiți Sursa

tests/checkasm: fix wrong summation of bench time

This was changed 8 years ago with the introduction of the linux-perf path,
with seemingly no justification at the time. Likely a developer oversight
from testing.

This bug not only made --runs completely ineffective, but also meant that we
didn't actually correctly filter out outliers.

Fixes: e0d56f097f42bcdbe6c3b2f57df62a4da63f2094
Niklas Haas 7 luni în urmă
părinte
comite
256a38101f
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      tests/checkasm/checkasm.h

+ 2 - 2
tests/checkasm/checkasm.h

@@ -364,8 +364,8 @@ typedef struct CheckasmPerf {
                 }\
             }\
             emms_c();\
-            perf->cycles += t;\
-            perf->iterations++;\
+            perf->cycles += tsum;\
+            perf->iterations += tcount;\
             checkasm_set_signal_handler_state(0);\
         }\
     } while (0)