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

Unified Diff: tools/perf/perf_tools/image_decoding_benchmark.py

Issue 11818024: InspectorTimeline improvements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/inspector_timeline.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/perf_tools/image_decoding_benchmark.py
diff --git a/tools/perf/perf_tools/image_decoding_benchmark.py b/tools/perf/perf_tools/image_decoding_benchmark.py
index c0df84eeed4a93e0b4c01fadc0adb184e6b4010c..00d0d4079bc6954fc315e284428a8fc47ba25560 100644
--- a/tools/perf/perf_tools/image_decoding_benchmark.py
+++ b/tools/perf/perf_tools/image_decoding_benchmark.py
@@ -15,7 +15,7 @@ class ImageDecoding(multi_page_benchmark.MultiPageBenchmark):
return tab.runtime.Evaluate('isDone')
decode_image_events = \
- tab.timeline.timeline_events.GetAllOfType('DecodeImage')
+ tab.timeline.timeline_events.GetAllOfName('DecodeImage')
# If it is a real image benchmark, then store only the last-minIterations
# decode tasks.
@@ -26,9 +26,9 @@ class ImageDecoding(multi_page_benchmark.MultiPageBenchmark):
min_iterations = tab.runtime.Evaluate('minIterations')
decode_image_events = decode_image_events[-min_iterations:]
- elapsed_times = [d.elapsed_time for d in decode_image_events]
- if not elapsed_times:
+ durations = [d.duration_ms for d in decode_image_events]
+ if not durations:
results.Add('ImageDecoding_avg', 'ms', 'unsupported')
return
- image_decoding_avg = sum(elapsed_times) / len(elapsed_times)
+ image_decoding_avg = sum(durations) / len(durations)
results.Add('ImageDecoding_avg', 'ms', image_decoding_avg)
« no previous file with comments | « no previous file | tools/telemetry/telemetry/inspector_timeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698