Skip to content

Commit

Permalink
tools/compare: don't actually discard valid (but zero) pvalue
Browse files Browse the repository at this point in the history
So, this is embarressing. For a very large number of repetitions,
we can end up with pvalue of a true zero, and it obviously compares false,
and we treat it as-if we failed to compute it...
  • Loading branch information
LebedevRI committed Jan 7, 2024
1 parent 9282814 commit 98757f8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/gbench/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def get_difference_report(json1, json2, utest=False):
have_optimal_repetitions, cpu_pvalue, time_pvalue = calc_utest(
timings_cpu, timings_time
)
if cpu_pvalue and time_pvalue:
if cpu_pvalue is not None and time_pvalue is not None:
utest_results = {
"have_optimal_repetitions": have_optimal_repetitions,
"cpu_pvalue": cpu_pvalue,
Expand Down Expand Up @@ -1518,7 +1518,6 @@ def load_results():
json1, json2 = load_results()
cls.json_diff_report = get_difference_report(json1, json2, utest=True)

@unittest.expectedFailure
def test_json_diff_report_pretty_printing(self):
expect_line = [
"BM_ManyRepetitions_pvalue",
Expand All @@ -1543,7 +1542,6 @@ def test_json_diff_report_pretty_printing(self):
break
self.assertTrue(found)

@unittest.expectedFailure
def test_json_diff_report(self):
expected_output = [
{
Expand Down

0 comments on commit 98757f8

Please sign in to comment.