def test_find_values_three_part_metric_old_delimiter(self):
     metric = perf_test.Metric('chart-foo/label/http___example.com_bar')
     results = {
         'charts': {
             'label-chart-foo': {
                 'http://example.com/bar': {
                     'type': 'list_of_scalar_values',
                     'values': [2.0, 3.0],
                 },
                 'summary': {
                     'type': 'list_of_scalar_values',
                     'values': [1.0, 2.0, 3.0]
                 }
             }
         }
     }
     self.assertEqual((True, [2.5]), perf_test.find_values(results, metric))
Beispiel #2
0
 def test_find_values_three_part_metric_old_delimiter(self):
   metric = perf_test.Metric('chart-foo/label/http___example.com_bar')
   results = {
       'charts': {
           'label-chart-foo': {
               'http://example.com/bar': {
                   'type': 'list_of_scalar_values',
                   'values': [2.0, 3.0],
               },
               'summary': {
                   'type': 'list_of_scalar_values',
                   'values': [1.0, 2.0, 3.0]
               }
           }
       }
   }
   self.assertEqual((True, [2.5]), perf_test.find_values(results, metric))
Beispiel #3
0
 def test_find_values_bogus_metric(self):
   metric = perf_test.Metric('chart-baz/trace')
   results = self._sample_results()
   self.assertEqual((False, []), perf_test.find_values(results, metric))
Beispiel #4
0
 def test_find_values_summary_metric_with_dash_in_chart(self):
   metric = perf_test.Metric('label-chart-foo/label-chart-foo')
   results = self._sample_results()
   self.assertEqual((True, [2.0]), perf_test.find_values(results, metric))
Beispiel #5
0
 def test_find_values_two_part_metric_with_dash_in_chart(self):
   metric = perf_test.Metric('label-chart-foo/http___example.com_bar')
   results = self._sample_results()
   self.assertEqual((True, [2.5]), perf_test.find_values(results, metric))
Beispiel #6
0
 def test_find_values_three_part_metric(self):
   metric = perf_test.Metric('chart-foo/label/http___example.com_bar')
   results = self._sample_results()
   self.assertEqual((True, [2.5]), perf_test.find_values(results, metric))
 def test_find_values_bogus_metric(self):
     metric = perf_test.Metric('chart-baz/trace')
     results = self._sample_results()
     self.assertEqual((False, []), perf_test.find_values(results, metric))
 def test_find_values_summary_metric_with_dash_in_chart(self):
     metric = perf_test.Metric('label-chart-foo/label-chart-foo')
     results = self._sample_results()
     self.assertEqual((True, [2.0]), perf_test.find_values(results, metric))
 def test_find_values_two_part_metric_with_dash_in_chart(self):
     metric = perf_test.Metric('label-chart-foo/http___example.com_bar')
     results = self._sample_results()
     self.assertEqual((True, [2.5]), perf_test.find_values(results, metric))
 def test_find_values_three_part_metric(self):
     metric = perf_test.Metric('chart-foo/label/http___example.com_bar')
     results = self._sample_results()
     self.assertEqual((True, [2.5]), perf_test.find_values(results, metric))