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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « tools/perf/measurements/thread_times.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from measurements import thread_times 5 from measurements import thread_times
6 from measurements import smoothness_unittest 6 from measurements import smoothness_unittest
7 from metrics import timeline 7 from metrics import timeline
8 from telemetry.core import wpr_modes 8 from telemetry.core import wpr_modes
9 from telemetry.unittest import options_for_unittests 9 from telemetry.unittest import options_for_unittests
10 from telemetry.unittest import page_test_test_case 10 from telemetry.unittest import page_test_test_case
(...skipping 26 matching lines...) Expand all
37 measurement = thread_times.ThreadTimes() 37 measurement = thread_times.ThreadTimes()
38 timeline_options = self._options 38 timeline_options = self._options
39 results = self.RunMeasurement(measurement, ps, options = timeline_options) 39 results = self.RunMeasurement(measurement, ps, options = timeline_options)
40 self.assertEquals(0, len(results.failures)) 40 self.assertEquals(0, len(results.failures))
41 41
42 for category in timeline.TimelineThreadCategories.values(): 42 for category in timeline.TimelineThreadCategories.values():
43 cpu_time_name = timeline.ThreadCpuTimeResultName(category) 43 cpu_time_name = timeline.ThreadCpuTimeResultName(category)
44 cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name) 44 cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name)
45 self.assertEquals(len(cpu_time), 1) 45 self.assertEquals(len(cpu_time), 1)
46 46
47 def testWithSilkResults(self):
48 ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html')
49 measurement = thread_times.ThreadTimes()
50 self._options.report_silk_results = True
51 results = self.RunMeasurement(measurement, ps, options = self._options)
52 self.assertEquals(0, len(results.failures))
53
54 for category in timeline.ReportSilkResults:
55 cpu_time_name = timeline.ThreadCpuTimeResultName(category)
56 cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name)
57 self.assertEquals(len(cpu_time), 1)
58
59 def testWithSilkDetails(self):
60 ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html')
61 measurement = thread_times.ThreadTimes()
62 self._options.report_silk_details = True
63 results = self.RunMeasurement(measurement, ps, options = self._options)
64 self.assertEquals(0, len(results.failures))
65
66 main_thread = "renderer_main"
67 expected_trace_categories = ["blink", "cc", "idle"]
68 for trace_category in expected_trace_categories:
69 value_name = timeline.ThreadDetailResultName(main_thread, trace_category)
70 values = results.FindAllPageSpecificValuesNamed(value_name)
71 self.assertEquals(len(values), 1)
47 72
48 def testCleanUpTrace(self): 73 def testCleanUpTrace(self):
49 self.TestTracingCleanedUp(thread_times.ThreadTimes, self._options) 74 self.TestTracingCleanedUp(thread_times.ThreadTimes, self._options)
OLDNEW
« 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