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

Side by Side Diff: tools/gpu/gpu_tools/texture_upload_benchmark.py

Issue 10914304: Add average commit time to perf tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix bug with texture_upload_benchmark.py 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
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 4 from chrome_remote_control import multi_page_benchmark
5 from gpu_tools import scrolling_benchmark 5 from gpu_tools import scrolling_benchmark
6 6
7 class TextureUploadBenchmark(scrolling_benchmark.ScrollingBenchmark): 7 class TextureUploadBenchmark(scrolling_benchmark.ScrollingBenchmark):
8 def MeasurePage(self, _, tab): 8 def MeasurePage(self, _, tab):
9 rendering_stats_deltas = self.ScrollPageFully(tab) 9 rendering_stats_deltas = self.ScrollPageFully(tab)
10
11 if (("totalCommitCount" not in rendering_stats_deltas)
12 or rendering_stats_deltas["totalCommitCount"] == 0) :
13 averageCommitTimeMs = 0
14 else :
15 averageCommitTimeMs = (
16 1000 * rendering_stats_deltas["totalCommitTimeInSeconds"] /
17 rendering_stats_deltas["totalCommitCount"])
18
10 return { 19 return {
11 'texture_upload_count': rendering_stats_deltas['textureUploadCount'] 20 'texture_upload_count': rendering_stats_deltas['textureUploadCount'],
21 'average_commit_time_ms': averageCommitTimeMs
12 } 22 }
13 23
14 def Main(): 24 def Main():
15 return multi_page_benchmark.Main(TextureUploadBenchmark()) 25 return multi_page_benchmark.Main(TextureUploadBenchmark())
OLDNEW
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | webkit/compositor_bindings/WebLayerTreeViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698