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

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

Issue 1914233003: [tools/perf] Delete unused variable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « tools/perf/measurements/draw_properties.py ('k') | tools/perf/measurements/media.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 2012 The Chromium Authors. All rights reserved. 1 # Copyright 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 from telemetry.page import page_test 5 from telemetry.page import page_test
6 from telemetry.timeline import model 6 from telemetry.timeline import model
7 from telemetry.timeline import tracing_config 7 from telemetry.timeline import tracing_config
8 from telemetry.value import scalar 8 from telemetry.value import scalar
9 9
10 from metrics import power 10 from metrics import power
(...skipping 30 matching lines...) Expand all
41 # FIXME: Remove the devtools.timeline category when impl-side painting is 41 # FIXME: Remove the devtools.timeline category when impl-side painting is
42 # on everywhere. 42 # on everywhere.
43 config.tracing_category_filter.AddDisabledByDefault( 43 config.tracing_category_filter.AddDisabledByDefault(
44 'disabled-by-default-devtools.timeline') 44 'disabled-by-default-devtools.timeline')
45 for c in ['blink', 'devtools.timeline', 'webkit.console', 'blink.console']: 45 for c in ['blink', 'devtools.timeline', 'webkit.console', 'blink.console']:
46 config.tracing_category_filter.AddIncludedCategory(c) 46 config.tracing_category_filter.AddIncludedCategory(c)
47 config.enable_chrome_trace = True 47 config.enable_chrome_trace = True
48 tab.browser.platform.tracing_controller.StartTracing(config) 48 tab.browser.platform.tracing_controller.StartTracing(config)
49 49
50 def StopBrowserAfterPage(self, browser, page): 50 def StopBrowserAfterPage(self, browser, page):
51 del page # unused
51 return not browser.tabs[0].ExecuteJavaScript(""" 52 return not browser.tabs[0].ExecuteJavaScript("""
52 window.chrome && 53 window.chrome &&
53 chrome.gpuBenchmarking && 54 chrome.gpuBenchmarking &&
54 chrome.gpuBenchmarking.clearImageCache; 55 chrome.gpuBenchmarking.clearImageCache;
55 """) 56 """)
56 57
57 def ValidateAndMeasurePage(self, page, tab, results): 58 def ValidateAndMeasurePage(self, page, tab, results):
58 timeline_data = tab.browser.platform.tracing_controller.StopTracing() 59 timeline_data = tab.browser.platform.tracing_controller.StopTracing()
59 timeline_model = model.TimelineModel(timeline_data) 60 timeline_model = model.TimelineModel(timeline_data)
60 self._power_metric.Stop(page, tab) 61 self._power_metric.Stop(page, tab)
(...skipping 29 matching lines...) Expand all
90 'formats: gif, png, jpg, and webp. The image files are ' 91 'formats: gif, png, jpg, and webp. The image files are '
91 'located at chrome/test/data/image_decoding.')) 92 'located at chrome/test/data/image_decoding.'))
92 results.AddValue(scalar.ScalarValue( 93 results.AddValue(scalar.ScalarValue(
93 results.current_page, 'ImageLoading_avg', 'ms', 94 results.current_page, 'ImageLoading_avg', 'ms',
94 tab.EvaluateJavaScript('averageLoadingTimeMs()'))) 95 tab.EvaluateJavaScript('averageLoadingTimeMs()')))
95 96
96 def DidRunPage(self, platform): 97 def DidRunPage(self, platform):
97 self._power_metric.Close() 98 self._power_metric.Close()
98 if platform.tracing_controller.is_tracing_running: 99 if platform.tracing_controller.is_tracing_running:
99 platform.tracing_controller.StopTracing() 100 platform.tracing_controller.StopTracing()
OLDNEW
« no previous file with comments | « tools/perf/measurements/draw_properties.py ('k') | tools/perf/measurements/media.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698