aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/runner.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 5e8cbeea..9214ae2d 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -13146,6 +13146,9 @@ elif 'benchmark' in str(sys.argv):
class benchmark(RunnerCore):
def print_stats(self, times, native_times, last=False, reps=TEST_REPS):
+ if reps == 0:
+ print '(no reps)'
+ return
mean = sum(times)/len(times)
squared_times = map(lambda x: x*x, times)
mean_of_squared = sum(squared_times)/len(times)