summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2012-02-21 10:37:24 -0600
committerAndy Doan <andy.doan@linaro.org>2012-02-21 10:37:24 -0600
commit8f865de78050a53fc548e584bbc4d16a928f2ad8 (patch)
tree56bfdfa8559fd63f9db47aa893b20e410bc30e20
parent549cb2481b0f1e51fbcbd94c8a39e26003bfc721 (diff)
downloadandroid_benchmark_views-8f865de78050a53fc548e584bbc4d16a928f2ad8.tar.gz
improvements for 0xbench reporting
The GarbageCollection test in 0xbench had two issues: 1) its measurement size is a couple of orders of magnitude bigger than than the other measurements, so the graphs look bad. 2) Smaller results are better This breaks out that test into its own run so that we can better display results to the user. Signed-off-by: Andy Doan <andy.doan@linaro.org>
-rw-r--r--android_benchmark_views_app/helpers.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/android_benchmark_views_app/helpers.py b/android_benchmark_views_app/helpers.py
index 3bf12b4..4b8d5c8 100644
--- a/android_benchmark_views_app/helpers.py
+++ b/android_benchmark_views_app/helpers.py
@@ -68,6 +68,36 @@ def _add_totals(test_averages):
'test_result_averages': tra,
})
+def _fix_0xbench(test_averages):
+ '''
+ The GarbageCollection test case in 0xbench causes two problems:
+ 1) its measurement size is a couple of orders of magnitude bigger than
+ than the other measurements, so the graphs look bad.
+ 2) Smaller is better
+ This function breaks that test case into its own test average to help
+ work around these issues
+ '''
+ #we can assume its the last test in the list
+ test = test_averages[-1]
+ if test['test'] != '0xbench':
+ raise Exception("test expected to be 0xbench but was %s" % test['test'])
+
+ tras = test['test_result_averages']
+ gb_idx = tras.count()-1
+ if tras[gb_idx]['test_case__test_case_id'] != 'GarbageCollection':
+ raise Exception("GarbageCollection test not found at proper index")
+
+ # add Garbage Collection as its own test
+ tra = tras[gb_idx]
+ test_averages.append({
+ 'test': '0xbench_GC',
+ 'test_result_averages': [tra],
+ 'b_is_b_str': 'Smaller is better',
+ })
+
+ # now pop off the garbage collection test from the 0xbench list
+ test_averages[-2]['test_result_averages'] = tras[0:gb_idx]
+
def benchmark_run_test_averages(benchmarkrun):
'''
Benchmark runs will consist of multiple runs of a test like "v8".
@@ -97,6 +127,9 @@ def benchmark_run_test_averages(benchmarkrun):
'test_result_averages':_get_test_result_averages(bundle, test),
'b_is_b_str': _b_is_b_str(test)
})
+ if test.test_id == '0xbench':
+ _fix_0xbench(test_averages)
+
_add_totals(test_averages)
return test_averages