def test_reading_results_from_dir(self): dir_path = self.ExampleDataDir() results = perfcompare.StatsFromMultiBootDataset( perfcompare.MultiBootDataset(dir_path)) test_name = 'fuchsia.example: ClockGetTimeExample' self.assertEquals(results[test_name].FormatConfidenceInterval(), '992 +/- 26 ns')
def CheckConfidenceInterval(self, data, interval_string): dir_path = self.DirOfData(data) test_name = 'example_suite: ExampleTest' stats = perfcompare.StatsFromMultiBootDataset( perfcompare.MultiBootDataset(dir_path))[test_name] self.assertEquals(stats.FormatConfidenceInterval(), interval_string)