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

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

Issue 11366197: Refactoring benchmarks for perf bot efficiency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4 from perf_tools import scrolling_benchmark
5
6 class TextureUploadBenchmark(scrolling_benchmark.ScrollingBenchmark):
7 def MeasurePage(self, page, tab, results):
8 rendering_stats_deltas = self.ScrollPageFully(page, tab)
9
10 num_frames_sent_to_screen = rendering_stats_deltas['numFramesSentToScreen']
11
12 dropped_percent = (
13 rendering_stats_deltas['droppedFrameCount'] /
14 float(num_frames_sent_to_screen))
15
16 if (('totalCommitCount' not in rendering_stats_deltas)
17 or rendering_stats_deltas['totalCommitCount'] == 0) :
18 averageCommitTimeMs = 0
19 else :
20 averageCommitTimeMs = (
21 1000 * rendering_stats_deltas['totalCommitTimeInSeconds'] /
22 rendering_stats_deltas['totalCommitCount'])
23
24 results.Add('dropped_percent', '%', round(dropped_percent * 100, 1))
25 results.Add('texture_upload_count', 'count',
26 rendering_stats_deltas['textureUploadCount'])
27 results.Add('average_commit_time', 'ms', averageCommitTimeMs)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698