diff options
author | Martin Peres <martin.peres@linux.intel.com> | 2015-08-31 19:56:43 +0300 |
---|---|---|
committer | Martin Peres <martin.peres@linux.intel.com> | 2015-08-31 19:58:14 +0300 |
commit | c7718267c8385aad726315614f4d3d30e0300576 (patch) | |
tree | 5a3717d59734261a3662051612c721cecd99a2dc | |
parent | f0128fe878bcc101314a818c621e98c7b97aa35c (diff) |
stats/gen_report: add a way to report the unit of the test (FPS or ms)
-rwxr-xr-x | stats/gen_report.py | 2 | ||||
-rw-r--r-- | utils/ezbench.py | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/stats/gen_report.py b/stats/gen_report.py index f916bf8..cae3f89 100755 --- a/stats/gen_report.py +++ b/stats/gen_report.py @@ -187,7 +187,7 @@ html_template=""" <th>Commit</th> <th>Geometric mean</th> % for benchmark in benchmarks: - <th>${benchmark.full_name}</th> + <th>${benchmark.full_name} (${result.unit_str})</th> % endfor </tr> </%def> diff --git a/utils/ezbench.py b/utils/ezbench.py index 173fc2b..77685e8 100644 --- a/utils/ezbench.py +++ b/utils/ezbench.py @@ -12,12 +12,13 @@ class Benchmark: self.prevValue = -1 class BenchResult: - def __init__(self, commit, benchmark, data_raw_file): + def __init__(self, commit, benchmark, data_raw_file, unit_str): self.commit = commit self.benchmark = benchmark self.data_raw_file = data_raw_file self.data = [] self.runs = [] + self.unit_str = unit_str class Commit: def __init__(self, sha1, full_name, compile_log, patch, label): @@ -174,8 +175,13 @@ def genPerformanceReport(log_folder, wantFrametime = False, silentMode = False): benchmark = Benchmark(bench_name) benchmarks.append(benchmark) + if wantFrametime: + unit = "ms" + else: + unit = "FPS" + # Create the result object - result = BenchResult(commit, benchmark, benchFile) + result = BenchResult(commit, benchmark, benchFile, unit) # Read the data and abort if there is no data result.data = readCsv(benchFile, wantFrametime) |