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

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

Issue 1084533005: Support total and per-second task/threadtime timeline metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 8 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/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 a6a2426e265ec0c1a44a71bef1a25da6ddf1f7e3..89a5b079b91dd7d2969e11385f2d07f1a8e9700f 100644
--- a/tools/perf/measurements/thread_times_unittest.py
+++ b/tools/perf/measurements/thread_times_unittest.py
@@ -69,3 +69,18 @@ class ThreadTimesUnitTest(page_test_test_case.PageTestTestCase):
def testCleanUpTrace(self):
self.TestTracingCleanedUp(thread_times.ThreadTimes, self._options)
+
+ def testBasicForTotalThreadTime(self):
+ ps = self.CreateEmptyPageSet()
+ ps.AddUserStory(AnimatedPage(ps))
+
+ per_frame=False
+ measurement = thread_times.ThreadTimes(measure_per_frame=per_frame)
+ timeline_options = self._options
+ results = self.RunMeasurement(measurement, ps, options = timeline_options)
+ self.assertEquals(0, len(results.failures))
+
+ for category in timeline.TimelineThreadCategories.values():
+ cpu_time_name = timeline.ThreadCpuTimeResultName(category, per_frame)
+ cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name)
+ self.assertEquals(len(cpu_time), 1)

Powered by Google App Engine
This is Rietveld 408576698