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

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: fix presubmit error "unused variable" Created 6 years, 10 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 | « no previous file | tools/perf/measurements/smoothness_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 'console.timeEnd("' + TIMELINE_MARKER + '")') 104 'console.timeEnd("' + TIMELINE_MARKER + '")')
105 105
106 timeline = tab.browser.StopTracing().AsTimelineModel() 106 timeline = tab.browser.StopTracing().AsTimelineModel()
107 try: 107 try:
108 timeline_markers = timeline.FindTimelineMarkers(TIMELINE_MARKER) 108 timeline_markers = timeline.FindTimelineMarkers(TIMELINE_MARKER)
109 except (MarkerMismatchError, MarkerOverlapError) as e: 109 except (MarkerMismatchError, MarkerOverlapError) as e:
110 raise page_measurement.MeasurementFailure(str(e)) 110 raise page_measurement.MeasurementFailure(str(e))
111 timeline_ranges = [ timeline_bounds.Bounds.CreateFromEvent(marker) 111 timeline_ranges = [ timeline_bounds.Bounds.CreateFromEvent(marker)
112 for marker in timeline_markers ] 112 for marker in timeline_markers ]
113 renderer_process = timeline.GetRendererProcessFromTab(tab) 113 renderer_process = timeline.GetRendererProcessFromTab(tab)
114 stats = rendering_stats.RenderingStats(renderer_process, timeline_ranges) 114
115 stats = rendering_stats.RenderingStats(
116 renderer_process, timeline.browser_process, timeline_ranges)
115 117
116 results.Add('rasterize_time', 'ms', max(FlattenList(stats.rasterize_times))) 118 results.Add('rasterize_time', 'ms', max(FlattenList(stats.rasterize_times)))
117 results.Add('record_time', 'ms', max(FlattenList(stats.record_times))) 119 results.Add('record_time', 'ms', max(FlattenList(stats.record_times)))
118 results.Add('rasterized_pixels', 'pixels', 120 results.Add('rasterized_pixels', 'pixels',
119 max(FlattenList(stats.rasterized_pixel_counts))) 121 max(FlattenList(stats.rasterized_pixel_counts)))
120 results.Add('recorded_pixels', 'pixels', 122 results.Add('recorded_pixels', 'pixels',
121 max(FlattenList(stats.recorded_pixel_counts))) 123 max(FlattenList(stats.recorded_pixel_counts)))
OLDNEW
« no previous file with comments | « no previous file | tools/perf/measurements/smoothness_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698