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

Side by Side Diff: tools/perf/perf_tools/texture_upload_benchmark.py

Issue 11199003: Create a run_multipage_benchmarks entry point for all benchmarks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address dtu's comments Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « tools/perf/perf_tools/skpicture_printer.py ('k') | tools/perf/run_first_paint_time_benchmark » ('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 from chrome_remote_control import multi_page_benchmark
5 from perf_tools import scrolling_benchmark 4 from perf_tools import scrolling_benchmark
6 5
7 class TextureUploadBenchmark(scrolling_benchmark.ScrollingBenchmark): 6 class TextureUploadBenchmark(scrolling_benchmark.ScrollingBenchmark):
8 def MeasurePage(self, page, tab, results): 7 def MeasurePage(self, page, tab, results):
9 rendering_stats_deltas = self.ScrollPageFully(page, tab) 8 rendering_stats_deltas = self.ScrollPageFully(page, tab)
10 9
11 if (('totalCommitCount' not in rendering_stats_deltas) 10 if (('totalCommitCount' not in rendering_stats_deltas)
12 or rendering_stats_deltas['totalCommitCount'] == 0) : 11 or rendering_stats_deltas['totalCommitCount'] == 0) :
13 averageCommitTimeMs = 0 12 averageCommitTimeMs = 0
14 else : 13 else :
15 averageCommitTimeMs = ( 14 averageCommitTimeMs = (
16 1000 * rendering_stats_deltas['totalCommitTimeInSeconds'] / 15 1000 * rendering_stats_deltas['totalCommitTimeInSeconds'] /
17 rendering_stats_deltas['totalCommitCount']) 16 rendering_stats_deltas['totalCommitCount'])
18 17
19 results.Add('texture_upload_count', 'count', 18 results.Add('texture_upload_count', 'count',
20 rendering_stats_deltas['textureUploadCount']) 19 rendering_stats_deltas['textureUploadCount'])
21 results.Add('average_commit_time', 'ms', averageCommitTimeMs) 20 results.Add('average_commit_time', 'ms', averageCommitTimeMs)
22
23 def Main():
24 return multi_page_benchmark.Main(TextureUploadBenchmark())
OLDNEW
« no previous file with comments | « tools/perf/perf_tools/skpicture_printer.py ('k') | tools/perf/run_first_paint_time_benchmark » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698