[Tooling] report.py: whoops, don't ignore the rest of benches after a bad one.

Refs #779.
This commit is contained in:
Roman Lebedev 2019-03-06 18:13:22 +03:00
parent f62c63b14f
commit df7c7ee1d3
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
3 changed files with 30 additions and 30 deletions

View File

@ -84,20 +84,6 @@
"cpu_time": 100, "cpu_time": 100,
"time_unit": "ns" "time_unit": "ns"
}, },
{
"name": "BM_BadTimeUnit",
"iterations": 1000,
"real_time": 0.4,
"cpu_time": 0.5,
"time_unit": "s"
},
{
"name": "BM_DifferentTimeUnit",
"iterations": 1,
"real_time": 1,
"cpu_time": 1,
"time_unit": "s"
},
{ {
"name": "MyComplexityTest_BigO", "name": "MyComplexityTest_BigO",
"run_name": "MyComplexityTest", "run_name": "MyComplexityTest",
@ -114,6 +100,20 @@
"run_type": "aggregate", "run_type": "aggregate",
"aggregate_name": "RMS", "aggregate_name": "RMS",
"rms": 4.5097802512472874e-03 "rms": 4.5097802512472874e-03
},
{
"name": "BM_NotBadTimeUnit",
"iterations": 1000,
"real_time": 0.4,
"cpu_time": 0.5,
"time_unit": "s"
},
{
"name": "BM_DifferentTimeUnit",
"iterations": 1,
"real_time": 1,
"cpu_time": 1,
"time_unit": "s"
} }
] ]
} }

View File

@ -84,20 +84,6 @@
"cpu_time": 66.664, "cpu_time": 66.664,
"time_unit": "ns" "time_unit": "ns"
}, },
{
"name": "BM_BadTimeUnit",
"iterations": 1000,
"real_time": 0.04,
"cpu_time": 0.6,
"time_unit": "s"
},
{
"name": "BM_DifferentTimeUnit",
"iterations": 1,
"real_time": 1,
"cpu_time": 1,
"time_unit": "ns"
},
{ {
"name": "MyComplexityTest_BigO", "name": "MyComplexityTest_BigO",
"run_name": "MyComplexityTest", "run_name": "MyComplexityTest",
@ -114,6 +100,20 @@
"run_type": "aggregate", "run_type": "aggregate",
"aggregate_name": "RMS", "aggregate_name": "RMS",
"rms": 3.3128901852342174e-03 "rms": 3.3128901852342174e-03
},
{
"name": "BM_NotBadTimeUnit",
"iterations": 1000,
"real_time": 0.04,
"cpu_time": 0.6,
"time_unit": "s"
},
{
"name": "BM_DifferentTimeUnit",
"iterations": 1,
"real_time": 1,
"cpu_time": 1,
"time_unit": "ns"
} }
] ]
} }

View File

@ -137,7 +137,7 @@ def partition_benchmarks(json1, json2):
time_unit = x['time_unit'] time_unit = x['time_unit']
break break
if time_unit is None: if time_unit is None:
break continue
# Filter by name and time unit. # Filter by name and time unit.
# All the repetitions are assumed to be comparable. # All the repetitions are assumed to be comparable.
lhs = [x for x in json1['benchmarks'] if x['name'] == name and lhs = [x for x in json1['benchmarks'] if x['name'] == name and
@ -341,7 +341,7 @@ class TestReportDifference(unittest.TestCase):
['BM_10PercentCPUToTime', '+0.1000', ['BM_10PercentCPUToTime', '+0.1000',
'-0.1000', '100', '110', '100', '90'], '-0.1000', '100', '110', '100', '90'],
['BM_ThirdFaster', '-0.3333', '-0.3334', '100', '67', '100', '67'], ['BM_ThirdFaster', '-0.3333', '-0.3334', '100', '67', '100', '67'],
['BM_BadTimeUnit', '-0.9000', '+0.2000', '0', '0', '0', '1'], ['BM_NotBadTimeUnit', '-0.9000', '+0.2000', '0', '0', '0', '1'],
] ]
json1, json2 = self.load_results() json1, json2 = self.load_results()
output_lines_with_header = generate_difference_report( output_lines_with_header = generate_difference_report(