Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: tracing/tracing/metrics/compare_samples_unittest.py

Issue 2527263004: [bisect] - Have compare_samples check for missing "summary" tracename. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/metrics/compare_samples_cmdline.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/compare_samples_unittest.py
diff --git a/tracing/tracing/metrics/compare_samples_unittest.py b/tracing/tracing/metrics/compare_samples_unittest.py
index 222637d6cde9786dff3d52e01334138f260af589..c1868ea72bd2e7401ccbdb9e495cad0b5ac55272 100644
--- a/tracing/tracing/metrics/compare_samples_unittest.py
+++ b/tracing/tracing/metrics/compare_samples_unittest.py
@@ -195,6 +195,28 @@ class CompareSamplesUnittest(unittest.TestCase):
lower_values, higher_values, '/'.join(metric)).stdout)
self.assertEqual(result['result']['significance'], FAIL_TO_REJECT)
+ def testCompareTIRLabel(self):
+ tir_metric = ('some_chart', 'some_label', 'some_trace')
+ tir_metric_name = ('%s@@%s' % (tir_metric[1], tir_metric[0]), tir_metric[2])
+ lower_values = ','.join([self.MakeChart(
+ metric=tir_metric_name, seed='lower', mu=10, sigma=1, n=10)])
+ higher_values = ','.join([self.MakeChart(
+ metric=tir_metric_name, seed='higher', mu=20, sigma=2, n=10)])
+ result = json.loads(compare_samples.CompareSamples(
+ lower_values, higher_values, '/'.join(tir_metric)).stdout)
+ self.assertEqual(result['result']['significance'], REJECT)
+
+ def testCompareTIRLabelMissingSummary(self):
+ tir_metric = ('some_chart', 'some_label')
+ tir_metric_name = ('%s@@%s' % (tir_metric[1], tir_metric[0]), 'summary')
+ lower_values = ','.join([self.MakeChart(
+ metric=tir_metric_name, seed='lower', mu=10, sigma=1, n=10)])
+ higher_values = ','.join([self.MakeChart(
+ metric=tir_metric_name, seed='higher', mu=20, sigma=2, n=10)])
+ result = json.loads(compare_samples.CompareSamples(
+ lower_values, higher_values, '/'.join(tir_metric)).stdout)
+ self.assertEqual(result['result']['significance'], REJECT)
+
def testCompareInsufficientData(self):
metric = ('some_chart', 'some_trace')
lower_values = ','.join([self.MakeChart(metric=metric, seed='lower',
« no previous file with comments | « tracing/tracing/metrics/compare_samples_cmdline.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698