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

Unified Diff: tools/telemetry/telemetry/page/buildbot_page_measurement_results_unittest.py

Issue 23545023: [Telemetry] Add 'name' attribute for pages, which allows for more human-readable printing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to update the unitttests :( Created 7 years, 3 months 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
Index: tools/telemetry/telemetry/page/buildbot_page_measurement_results_unittest.py
diff --git a/tools/telemetry/telemetry/page/buildbot_page_measurement_results_unittest.py b/tools/telemetry/telemetry/page/buildbot_page_measurement_results_unittest.py
index 04505aab980b7eecab799f2c75c1bbc5dc4d3cbb..3a4cc5fc2cca98faf056840fc303181e6a34a124 100644
--- a/tools/telemetry/telemetry/page/buildbot_page_measurement_results_unittest.py
+++ b/tools/telemetry/telemetry/page/buildbot_page_measurement_results_unittest.py
@@ -43,8 +43,8 @@ class BuildbotPageMeasurementResultsTest(unittest.TestCase):
measurement_results.DidMeasurePage()
measurement_results.PrintSummary()
- expected = ['RESULT a_by_url: http___www.foo.com_= 3 seconds',
- 'RESULT a_by_url: http___www.bar.com_= 7 seconds',
+ expected = ['RESULT a_by_name: http___www.foo.com_= 3 seconds',
tonyg 2013/09/06 04:32:24 Sorry I missed this before, but the dashboard had
+ 'RESULT a_by_name: http___www.bar.com_= 7 seconds',
'*RESULT a: a= [3,7] seconds\nAvg a: 5.000000seconds\n' +
'Sd a: 2.828427seconds']
self.assertEquals(measurement_results.results, expected)
@@ -69,13 +69,13 @@ class BuildbotPageMeasurementResultsTest(unittest.TestCase):
measurement_results.DidMeasurePage()
measurement_results.PrintSummary()
- expected = ['RESULT a_by_url: http___www.foo.com_= 3 seconds',
- 'RESULT a_by_url: http___www.bar.com_= 3 seconds',
- 'RESULT a_by_url: http___www.baz.com_= 7 seconds',
+ expected = ['RESULT a_by_name: http___www.foo.com_= 3 seconds',
+ 'RESULT a_by_name: http___www.bar.com_= 3 seconds',
+ 'RESULT a_by_name: http___www.baz.com_= 7 seconds',
'*RESULT a: a= [3,3,7] seconds\nAvg a: 4.333333seconds\n' +
'Sd a: 2.309401seconds',
- 'RESULT b_by_url: http___www.foo.com_= 10 seconds',
- 'RESULT b_by_url: http___www.bar.com_= 10 seconds',
+ 'RESULT b_by_name: http___www.foo.com_= 10 seconds',
+ 'RESULT b_by_name: http___www.bar.com_= 10 seconds',
'*RESULT b: b= [10,10] seconds\nAvg b: 10.000000seconds']
self.assertEquals(measurement_results.results, expected)
@@ -94,7 +94,7 @@ class BuildbotPageMeasurementResultsTest(unittest.TestCase):
measurement_results.DidMeasurePage()
measurement_results.PrintSummary()
- expected = ['RESULT a_by_url: http___www.bar.com_= 7 seconds']
+ expected = ['RESULT a_by_name: http___www.bar.com_= 7 seconds']
self.assertEquals(measurement_results.results, expected)
def test_repeated_pageset_one_iteration_one_page_fails(self):
@@ -120,8 +120,9 @@ class BuildbotPageMeasurementResultsTest(unittest.TestCase):
measurement_results.DidMeasurePage()
measurement_results.PrintSummary()
- expected = ['RESULT a_by_url: http___www.foo.com_= [3,4] seconds\n' +
- 'Avg a_by_url: 3.500000seconds\nSd a_by_url: 0.707107seconds']
+ expected = ['RESULT a_by_name: http___www.foo.com_= [3,4] seconds\n' +
+ 'Avg a_by_name: 3.500000seconds\n' +
+ 'Sd a_by_name: 0.707107seconds']
self.assertEquals(measurement_results.results, expected)
def test_repeated_pageset(self):
@@ -145,12 +146,15 @@ class BuildbotPageMeasurementResultsTest(unittest.TestCase):
measurement_results.DidMeasurePage()
measurement_results.PrintSummary()
- expected = ['RESULT a_by_url: http___www.foo.com_= [3,4] seconds\n' +
- 'Avg a_by_url: 3.500000seconds\nSd a_by_url: 0.707107seconds',
- 'RESULT a_by_url: http___www.bar.com_= [7,8] seconds\n' +
- 'Avg a_by_url: 7.500000seconds\nSd a_by_url: 0.707107seconds',
+ expected = ['RESULT a_by_name: http___www.foo.com_= [3,4] seconds\n' +
+ 'Avg a_by_name: 3.500000seconds\n' +
+ 'Sd a_by_name: 0.707107seconds',
+ 'RESULT a_by_name: http___www.bar.com_= [7,8] seconds\n' +
+ 'Avg a_by_name: 7.500000seconds\n' +
+ 'Sd a_by_name: 0.707107seconds',
'*RESULT a: a= [3,7,4,8] seconds\n' +
- 'Avg a: 5.500000seconds\nSd a: 2.380476seconds'
+ 'Avg a: 5.500000seconds\n'
+ 'Sd a: 2.380476seconds'
]
self.assertEquals(
measurement_results.results,
@@ -177,12 +181,15 @@ class BuildbotPageMeasurementResultsTest(unittest.TestCase):
measurement_results.DidMeasurePage()
measurement_results.PrintSummary()
- expected = ['RESULT a_by_url: http___www.foo.com_= [3,4] seconds\n' +
- 'Avg a_by_url: 3.500000seconds\nSd a_by_url: 0.707107seconds',
- 'RESULT a_by_url: http___www.bar.com_= [7,8] seconds\n' +
- 'Avg a_by_url: 7.500000seconds\nSd a_by_url: 0.707107seconds',
+ expected = ['RESULT a_by_name: http___www.foo.com_= [3,4] seconds\n' +
+ 'Avg a_by_name: 3.500000seconds\n' +
+ 'Sd a_by_name: 0.707107seconds',
+ 'RESULT a_by_name: http___www.bar.com_= [7,8] seconds\n' +
+ 'Avg a_by_name: 7.500000seconds\n' +
+ 'Sd a_by_name: 0.707107seconds',
'*RESULT a: a= [3,4,7,8] seconds\n' +
- 'Avg a: 5.500000seconds\nSd a: 2.380476seconds'
+ 'Avg a: 5.500000seconds\n' +
+ 'Sd a: 2.380476seconds'
]
self.assertEquals(
measurement_results.results,
@@ -209,8 +216,8 @@ class BuildbotPageMeasurementResultsTest(unittest.TestCase):
self.assertEquals(
measurement_results.results,
- ['RESULT b_by_url: http___www.foo.com_= 2 seconds',
- 'RESULT b_by_url: http___www.bar.com_= 3 seconds',
+ ['RESULT b_by_name: http___www.foo.com_= 2 seconds',
+ 'RESULT b_by_name: http___www.bar.com_= 3 seconds',
'*RESULT b: b= [2,3] seconds\n' +
'Avg b: 2.500000seconds\nSd b: 0.707107seconds',
'*RESULT a: a= 1 seconds',
@@ -261,10 +268,10 @@ class BuildbotPageMeasurementResultsTest(unittest.TestCase):
measurement_results.PrintSummary()
expected = [
- 'HISTOGRAM a_by_url: http___www.foo.com_= ' +
+ 'HISTOGRAM a_by_name: http___www.foo.com_= ' +
'{"buckets": [{"low": 1, "high": 2, "count": 1}]}\n' +
- 'Avg a_by_url: 1.500000',
- 'HISTOGRAM a_by_url: http___www.bar.com_= ' +
+ 'Avg a_by_name: 1.500000',
+ 'HISTOGRAM a_by_name: http___www.bar.com_= ' +
'{"buckets": [{"low": 2, "high": 3, "count": 1}]}\n' +
- 'Avg a_by_url: 2.500000']
+ 'Avg a_by_name: 2.500000']
self.assertEquals(measurement_results.results, expected)

Powered by Google App Engine
This is Rietveld 408576698