Esempio n. 1
0
 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')
Esempio n. 2
0
 def test_readback_of_data(self):
     data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
     dataset = perfcompare.MultiBootDataset(self.DirOfData(data))
     boot_datasets = list(dataset.GetBootDatasets())
     self.assertEquals(len(boot_datasets), 2)
     self.assertEquals(list(boot_datasets[0].GetProcessDatasets()),
                       [[self.ResultsDictForValues([1, 2])],
                        [self.ResultsDictForValues([3, 4])]])
     self.assertEquals(list(boot_datasets[1].GetProcessDatasets()),
                       [[self.ResultsDictForValues([5, 6])],
                        [self.ResultsDictForValues([7, 8])]])
Esempio n. 3
0
 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)