# Path: compiler_opt/tools/benchmark_report.py
# def _geomean(data: List[float]):
# def _stdev(data: List[float]):
#   def __init__(self, suite_name: str, json_data: BenchmarkRunResults,
#                counter_names: Iterable[str]):
#   def suite_name(self):
#   def values(self):
#   def names(self):
#   def counters(self):
#   def raw_measurements(self):
#   def counter_means(self, benchmark: str, counter: str) -> Tuple[float, float]:
#   def zero_counters(self):
#   def large_variation_counters(self, variation: float):
#   def _load_values(self, data: BenchmarkRunResults,
#                    names: Iterable[str]) -> PerBenchmarkResults:
#   def __init__(self, base_report: BenchmarkReport, exp_report: BenchmarkReport):
#   def suite_name(self):
#   def summarize(self) -> ABComparison:
#   def names(self):
#   def counters(self):
#   def total_improvement(self, counter: str):
# class BenchmarkReport:
# class BenchmarkComparison:


from absl.testing import absltest
from compiler_opt.tools import benchmark_report
    ]
}


class BenchmarkReportConverterTest(absltest.TestCase):

  def test_loading(self):
    report = benchmark_report.BenchmarkReport(
        'foo', base_data, ['PerfCounter_0', 'PerfCounter_1'])
    self.assertEqual(
        report.values(), {
            'BM_A': {
                'PerfCounter_0': [10, 11],
                'PerfCounter_1': [20, 19]
            },
            'BM_B': {
                'PerfCounter_0': [60],
                'PerfCounter_1': [50],
            }
        })
    self.assertSetEqual(report.names(), set(['BM_A', 'BM_B']))
    self.assertSetEqual(report.counters(),
                        set(['PerfCounter_0', 'PerfCounter_1']))
    self.assertEqual(
        report.counter_means('BM_A', 'PerfCounter_0'),
        (10.488088481701517, 0.7071067811865476))

  def test_summarize_results(self):
    b_values = benchmark_report.BenchmarkReport(
        'foo', base_data, ['PerfCounter_0', 'PerfCounter_1'])

# Path: compiler_opt/tools/benchmark_report.py
# def _geomean(data: List[float]):
# def _stdev(data: List[float]):
#   def __init__(self, suite_name: str, json_data: BenchmarkRunResults,
#                counter_names: Iterable[str]):
#   def suite_name(self):
#   def values(self):
#   def names(self):
#   def counters(self):
#   def raw_measurements(self):
#   def counter_means(self, benchmark: str, counter: str) -> Tuple[float, float]:
#   def zero_counters(self):
#   def large_variation_counters(self, variation: float):
#   def _load_values(self, data: BenchmarkRunResults,
#                    names: Iterable[str]) -> PerBenchmarkResults:
#   def __init__(self, base_report: BenchmarkReport, exp_report: BenchmarkReport):
#   def suite_name(self):
#   def summarize(self) -> ABComparison:
#   def names(self):
#   def counters(self):
#   def total_improvement(self, counter: str):
# class BenchmarkReport:
# class BenchmarkComparison:


# Path: compiler_opt/tools/benchmark_report_test.py
from absl.testing import absltest
from compiler_opt.tools import benchmark_report

    ]
}


class BenchmarkReportConverterTest(absltest.TestCase):

  def test_loading(self):
    report = benchmark_report.BenchmarkReport(
        'foo', base_data, ['PerfCounter_0', 'PerfCounter_1'])
    self.assertEqual(
        report.values(), {
            'BM_A': {
                'PerfCounter_0': [10, 11],
                'PerfCounter_1': [20, 19]
            },
            'BM_B': {
                'PerfCounter_0': [60],
                'PerfCounter_1': [50],
            }
        })
    self.assertSetEqual(report.names(), set(['BM_A', 'BM_B']))
    self.assertSetEqual(report.counters(),
                        set(['PerfCounter_0', 'PerfCounter_1']))
    self.assertEqual(
        report.counter_means('BM_A', 'PerfCounter_0'),
        (10.488088481701517, 0.7071067811865476))

  def test_summarize_results(self):
    b_values = benchmark_report.BenchmarkReport(
        'foo', base_data, ['PerfCounter_0', 'PerfCounter_1'])

    e_values = benchmark_report.BenchmarkReport(