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

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

Issue 208643007: Add cleanup for measurements that use tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 time 6 import time
7 7
8 from metrics import rendering_stats 8 from metrics import rendering_stats
9 from telemetry.page import page_measurement 9 from telemetry.page import page_measurement
10 from telemetry.page.perf_tests_helper import FlattenList 10 from telemetry.page.perf_tests_helper import FlattenList
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 stats = rendering_stats.RenderingStats( 115 stats = rendering_stats.RenderingStats(
116 renderer_process, timeline.browser_process, timeline_ranges) 116 renderer_process, timeline.browser_process, timeline_ranges)
117 117
118 results.Add('rasterize_time', 'ms', max(FlattenList(stats.rasterize_times))) 118 results.Add('rasterize_time', 'ms', max(FlattenList(stats.rasterize_times)))
119 results.Add('record_time', 'ms', max(FlattenList(stats.record_times))) 119 results.Add('record_time', 'ms', max(FlattenList(stats.record_times)))
120 results.Add('rasterized_pixels', 'pixels', 120 results.Add('rasterized_pixels', 'pixels',
121 max(FlattenList(stats.rasterized_pixel_counts))) 121 max(FlattenList(stats.rasterized_pixel_counts)))
122 results.Add('recorded_pixels', 'pixels', 122 results.Add('recorded_pixels', 'pixels',
123 max(FlattenList(stats.recorded_pixel_counts))) 123 max(FlattenList(stats.recorded_pixel_counts)))
124
125 def CleanUpAfterPage(self, page, tab):
126 if tab.browser.is_tracing_running:
127 tab.browser.StopTracing()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698