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

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

Issue 2719853003: [Telemetry refactor] Drop "2" from method calls to JS API (Closed)
Patch Set: Created 3 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
« no previous file with comments | « tools/perf/measurements/rasterize_and_record_micro.py ('k') | tools/perf/metrics/loading.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 import glob 4 import glob
5 import os 5 import os
6 6
7 from telemetry.page import legacy_page_test 7 from telemetry.page import legacy_page_test
8 from telemetry.value import scalar 8 from telemetry.value import scalar
9 9
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 def ValidateAndMeasurePage(self, page, tab, results): 22 def ValidateAndMeasurePage(self, page, tab, results):
23 if tab.browser.platform.GetOSName() in ['android', 'chromeos']: 23 if tab.browser.platform.GetOSName() in ['android', 'chromeos']:
24 raise legacy_page_test.MeasurementFailure( 24 raise legacy_page_test.MeasurementFailure(
25 'SkPicture printing not supported on this platform') 25 'SkPicture printing not supported on this platform')
26 26
27 outpath = os.path.abspath( 27 outpath = os.path.abspath(
28 os.path.join(self._skp_outdir, page.file_safe_name)) 28 os.path.join(self._skp_outdir, page.file_safe_name))
29 # Replace win32 path separator char '\' with '\\'. 29 # Replace win32 path separator char '\' with '\\'.
30 outpath = outpath.replace('\\', '\\\\') 30 outpath = outpath.replace('\\', '\\\\')
31 tab.EvaluateJavaScript2( 31 tab.EvaluateJavaScript(
32 'chrome.gpuBenchmarking.printToSkPicture({{ outpath }});', 32 'chrome.gpuBenchmarking.printToSkPicture({{ outpath }});',
33 outpath=outpath) 33 outpath=outpath)
34 pictures = glob.glob(os.path.join(outpath, '*.skp')) 34 pictures = glob.glob(os.path.join(outpath, '*.skp'))
35 results.AddValue(scalar.ScalarValue( 35 results.AddValue(scalar.ScalarValue(
36 results.current_page, 'saved_picture_count', 'count', len(pictures))) 36 results.current_page, 'saved_picture_count', 'count', len(pictures)))
OLDNEW
« no previous file with comments | « tools/perf/measurements/rasterize_and_record_micro.py ('k') | tools/perf/metrics/loading.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698