Skip to content

Commit

Permalink
Add geometric mean calculation to analysis script
Browse files Browse the repository at this point in the history
  • Loading branch information
KS committed Jul 11, 2024
1 parent 824aafb commit ba31fa9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/advanced_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import argparse
import json
import numpy as np
from scipy.stats import gmean

parser = argparse.ArgumentParser()
parser.add_argument("file", help="JSON file with benchmark results")
Expand All @@ -25,6 +26,7 @@
print("Command '{}'".format(command))
print(" runs: {:8d}".format(len(ts)))
print(" mean: {:8.3f} s".format(np.mean(ts)))
print(" geomean:{:8.3f} s".format(gmean(ts)))
print(" stddev: {:8.3f} s".format(np.std(ts, ddof=1)))
print(" median: {:8.3f} s".format(np.median(ts)))
print(" min: {:8.3f} s".format(np.min(ts)))
Expand Down

0 comments on commit ba31fa9

Please sign in to comment.