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

Side by Side Diff: tools/perf/measurements/rasterize_and_record.py

Issue 132433004: Collecting LatencyInfo in telemetry (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: unittest added Created 6 years, 11 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
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 import logging 5 import logging
6 import sys 6 import sys
7 import time 7 import time
8 8
9 from metrics import rendering_stats 9 from metrics import rendering_stats
10 from telemetry.page import page_measurement 10 from telemetry.page import page_measurement
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 'console.timeEnd("' + TIMELINE_MARKER + '")') 103 'console.timeEnd("' + TIMELINE_MARKER + '")')
104 104
105 timeline = tab.browser.StopTracing().AsTimelineModel() 105 timeline = tab.browser.StopTracing().AsTimelineModel()
106 try: 106 try:
107 timeline_markers = timeline.FindTimelineMarkers(TIMELINE_MARKER) 107 timeline_markers = timeline.FindTimelineMarkers(TIMELINE_MARKER)
108 except (MarkerMismatchError, MarkerOverlapError) as e: 108 except (MarkerMismatchError, MarkerOverlapError) as e:
109 raise page_measurement.MeasurementFailure(str(e)) 109 raise page_measurement.MeasurementFailure(str(e))
110 timeline_ranges = [ timeline_bounds.Bounds.CreateFromEvent(marker) 110 timeline_ranges = [ timeline_bounds.Bounds.CreateFromEvent(marker)
111 for marker in timeline_markers ] 111 for marker in timeline_markers ]
112 renderer_process = timeline.GetRendererProcessFromTab(tab) 112 renderer_process = timeline.GetRendererProcessFromTab(tab)
113 stats = rendering_stats.RenderingStats(renderer_process, timeline_ranges) 113 browser_main_thread = timeline.GetBrowserMainThread()
114
115 stats = rendering_stats.RenderingStats(
116 renderer_process, browser_main_thread, timeline_ranges)
114 117
115 results.Add('rasterize_time', 'ms', 118 results.Add('rasterize_time', 'ms',
116 max(stats.rasterize_time)) 119 max(stats.rasterize_time))
117 results.Add('record_time', 'ms', 120 results.Add('record_time', 'ms',
118 max(stats.record_time)) 121 max(stats.record_time))
119 results.Add('rasterized_pixels', 'pixels', 122 results.Add('rasterized_pixels', 'pixels',
120 max(stats.rasterized_pixel_count)) 123 max(stats.rasterized_pixel_count))
121 results.Add('recorded_pixels', 'pixels', 124 results.Add('recorded_pixels', 'pixels',
122 max(stats.recorded_pixel_count)) 125 max(stats.recorded_pixel_count))
OLDNEW
« no previous file with comments | « no previous file | tools/perf/measurements/smoothness_unittest.py » ('j') | tools/perf/metrics/smoothness.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698