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

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

Issue 615253007: Telemetry: Correct typo in _timeline_controller identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: separate --report-silk-details/--report-silk-results tests Created 6 years, 2 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 | « tools/perf/measurements/thread_times.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/thread_times_unittest.py
diff --git a/tools/perf/measurements/thread_times_unittest.py b/tools/perf/measurements/thread_times_unittest.py
index f86bd33d3b55ae326a9a8a79e33811408b5c69dd..65f1800c341e8517b6f0de75175cfb89b4e5332c 100644
--- a/tools/perf/measurements/thread_times_unittest.py
+++ b/tools/perf/measurements/thread_times_unittest.py
@@ -44,6 +44,31 @@ class ThreadTimesUnitTest(page_test_test_case.PageTestTestCase):
cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name)
self.assertEquals(len(cpu_time), 1)
+ def testWithSilkResults(self):
+ ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html')
+ measurement = thread_times.ThreadTimes()
+ self._options.report_silk_results = True
+ results = self.RunMeasurement(measurement, ps, options = self._options)
+ self.assertEquals(0, len(results.failures))
+
+ for category in timeline.ReportSilkResults:
+ cpu_time_name = timeline.ThreadCpuTimeResultName(category)
+ cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name)
+ self.assertEquals(len(cpu_time), 1)
+
+ def testWithSilkDetails(self):
+ ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html')
+ measurement = thread_times.ThreadTimes()
+ self._options.report_silk_details = True
+ results = self.RunMeasurement(measurement, ps, options = self._options)
+ self.assertEquals(0, len(results.failures))
+
+ main_thread = "renderer_main"
+ expected_trace_categories = ["blink", "cc", "idle"]
+ for trace_category in expected_trace_categories:
+ value_name = timeline.ThreadDetailResultName(main_thread, trace_category)
+ values = results.FindAllPageSpecificValuesNamed(value_name)
+ self.assertEquals(len(values), 1)
def testCleanUpTrace(self):
self.TestTracingCleanedUp(thread_times.ThreadTimes, self._options)
« no previous file with comments | « tools/perf/measurements/thread_times.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698