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

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

Issue 12100007: Disable image decoding perf test for android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove method Created 7 years, 10 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 | « no previous file | tools/perf/perf_tools/image_decoding_benchmark_unittest.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 (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 4
5 from telemetry import multi_page_benchmark 5 from telemetry import multi_page_benchmark
6 6
7 7
8 class ImageDecoding(multi_page_benchmark.MultiPageBenchmark): 8 class ImageDecoding(multi_page_benchmark.MultiPageBenchmark):
9 def WillNavigateToPage(self, page, tab): 9 # TODO(qinmin): uncomment this after we fix the image decoding benchmark
10 tab.StartTimelineRecording() 10 # for lazily decoded images
11 # def WillNavigateToPage(self, page, tab):
12 # tab.StartTimelineRecording()
11 13
12 def MeasurePage(self, page, tab, results): 14 def MeasurePage(self, page, tab, results):
13 tab.StopTimelineRecording() 15 # TODO(qinmin): This android only test may fail after we switch to
14 def _IsDone(): 16 # deferred image decoding and impl-side painting. Before we fix the test,
15 return tab.EvaluateJavaScript('isDone') 17 # temporarily disable calculation for lazily decoded images.
18 # Uncommented the following lines after we fix the timeline for lazily
19 # decoded images.
20 return
21 # tab.StopTimelineRecording()
22 # def _IsDone():
23 # return tab.EvaluateJavaScript('isDone')
16 24
17 decode_image_events = \ 25 # decode_image_events = \
18 tab.timeline_model.GetAllOfName('DecodeImage') 26 # tab.timeline_model.GetAllOfName('DecodeImage')
19 27
20 # If it is a real image benchmark, then store only the last-minIterations 28 # If it is a real image benchmark, then store only the last-minIterations
21 # decode tasks. 29 # decode tasks.
22 if (hasattr(page, 30 # if (hasattr(page,
23 'image_decoding_benchmark_limit_results_to_min_iterations') and 31 # 'image_decoding_benchmark_limit_results_to_min_iterations') and
24 page.image_decoding_benchmark_limit_results_to_min_iterations): 32 # page.image_decoding_benchmark_limit_results_to_min_iterations):
25 assert _IsDone() 33 # assert _IsDone()
26 min_iterations = tab.EvaluateJavaScript('minIterations') 34 # min_iterations = tab.EvaluateJavaScript('minIterations')
27 decode_image_events = decode_image_events[-min_iterations:] 35 # decode_image_events = decode_image_events[-min_iterations:]
28 36
29 durations = [d.duration_ms for d in decode_image_events] 37 # durations = [d.duration_ms for d in decode_image_events]
30 if not durations: 38 # if not durations:
31 results.Add('ImageDecoding_avg', 'ms', 'unsupported') 39 # results.Add('ImageDecoding_avg', 'ms', 'unsupported')
32 return 40 # return
33 image_decoding_avg = sum(durations) / len(durations) 41 # image_decoding_avg = sum(durations) / len(durations)
34 results.Add('ImageDecoding_avg', 'ms', image_decoding_avg) 42 # results.Add('ImageDecoding_avg', 'ms', image_decoding_avg)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/perf_tools/image_decoding_benchmark_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698