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

Unified Diff: tools/perf/metrics/timeline_unittest.py

Issue 643343002: Telemetry: Add mean-frame-time and tasks-per-frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/metrics/timeline.py ('k') | tools/telemetry/telemetry/util/statistics.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/timeline_unittest.py
diff --git a/tools/perf/metrics/timeline_unittest.py b/tools/perf/metrics/timeline_unittest.py
index 01c054760979987a0f6cdcff2905667010508243..b6a26fd1c7a89c9ed9102e50298628a156fcb284 100644
--- a/tools/perf/metrics/timeline_unittest.py
+++ b/tools/perf/metrics/timeline_unittest.py
@@ -138,16 +138,19 @@ class ThreadTimesTimelineMetricUnittest(unittest.TestCase):
results = self.GetResults(metric, model, renderer_main.parent,
[_GetInteractionRecord(10, 30)])
-
- # Test a couple specific results.
- assert_results = {
- timeline.ThreadCpuTimeResultName('renderer_main') : 9.75,
- timeline.ThreadDetailResultName('renderer_main','cat1') : 9.5,
- timeline.ThreadDetailResultName('renderer_main','cat2') : 0.5,
- timeline.ThreadDetailResultName('renderer_main','idle') : 0
- }
- for name, value in assert_results.iteritems():
- results.AssertHasPageSpecificScalarValue(name, 'ms', value)
+ # Test for the results we expect.
+ main_thread = "renderer_main"
+ cc_thread = 'renderer_compositor'
+ assert_results = [
+ (timeline.ThreadCpuTimeResultName(main_thread), 'ms', 9.75),
+ (timeline.ThreadTasksResultName(main_thread), 'tasks', 0.5),
+ (timeline.ThreadMeanFrameTimeResultName(cc_thread), 'ms', 10.0),
+ (timeline.ThreadDetailResultName(main_thread,'cat1'), 'ms', 9.5),
+ (timeline.ThreadDetailResultName(main_thread,'cat2'), 'ms', 0.5),
+ (timeline.ThreadDetailResultName(main_thread,'idle'), 'ms', 0)
+ ]
+ for name, unit, value in assert_results:
+ results.AssertHasPageSpecificScalarValue(name, unit, value)
def testOverheadIsRemoved(self):
model = model_module.TimelineModel()
« no previous file with comments | « tools/perf/metrics/timeline.py ('k') | tools/telemetry/telemetry/util/statistics.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698