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

Unified Diff: tools/perf/measurements/page_cycler_unittest.py

Issue 239083010: Telemetry: adds CPU frequency stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes mac Created 6 years, 7 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
« no previous file with comments | « no previous file | tools/perf/metrics/cpu.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/page_cycler_unittest.py
diff --git a/tools/perf/measurements/page_cycler_unittest.py b/tools/perf/measurements/page_cycler_unittest.py
index fcbbd532fe720f022bab833c3981c287f23ac968..20607af47035d6a4ee0c7e926d52eb9eaf813c41 100644
--- a/tools/perf/measurements/page_cycler_unittest.py
+++ b/tools/perf/measurements/page_cycler_unittest.py
@@ -67,7 +67,10 @@ class FakeBrowser(object):
'Renderer': {'CpuProcessTime': FakeBrowser._iteration,
'TotalTime': FakeBrowser._iteration * 3},
'Gpu': {'CpuProcessTime': FakeBrowser._iteration,
- 'TotalTime': FakeBrowser._iteration * 4}
+ 'TotalTime': FakeBrowser._iteration * 4},
+ 'Global': {'GlobalCpuFrequencyStats':
+ {1000000: FakeBrowser._iteration * 5,
+ 2000000: FakeBrowser._iteration * 6}},
}
@property
def platform(self):
@@ -200,7 +203,7 @@ class PageCyclerUnitTest(unittest.TestCase):
values = results.page_specific_values_for_current_page
results.DidMeasurePage()
- self.assertEqual(4, len(values))
+ self.assertEqual(5, len(values))
self.assertEqual(values[0].page, page)
chart_name = 'cold_times' if i == 0 else 'warm_times'
@@ -213,5 +216,9 @@ class PageCyclerUnitTest(unittest.TestCase):
'cpu_utilization.cpu_utilization_%s' % expected)
self.assertEqual(value.units, '%')
+ self.assertEqual(values[4].page, page)
+ self.assertEqual(values[4].name,
+ 'cpu_frequency.average_frequency_mhz')
+ self.assertEqual(values[4].units, 'MHz')
cycler.DidNavigateToPage(page, tab)
« no previous file with comments | « no previous file | tools/perf/metrics/cpu.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698