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

Side by Side Diff: tools/perf/metrics/media.py

Issue 21134002: Add Telemetry media loop action. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 3 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/metrics/media.js ('k') | tools/telemetry/telemetry/page/actions/loop.js » ('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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 import logging 4 import logging
5 import os 5 import os
6 6
7 from metrics import Metric 7 from metrics import Metric
8 8
9 class MediaMetric(Metric): 9 class MediaMetric(Metric):
10 """MediaMetric class injects and calls JS responsible for recording metrics. 10 """MediaMetric class injects and calls JS responsible for recording metrics.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 for m in metrics: 51 for m in metrics:
52 if m.startswith(metric): 52 if m.startswith(metric):
53 special_label = m[len(metric):] 53 special_label = m[len(metric):]
54 results.Add(trace + special_label, unit, str(metrics[m]), 54 results.Add(trace + special_label, unit, str(metrics[m]),
55 chart_name=metric, data_type='default') 55 chart_name=metric, data_type='default')
56 56
57 trace = media_metric['id'] 57 trace = media_metric['id']
58 if not trace: 58 if not trace:
59 logging.error('Metrics ID is missing in results.') 59 logging.error('Metrics ID is missing in results.')
60 return 60 return
61 AddOneResult('avg_loop_time', 'sec')
61 AddOneResult('decoded_audio_bytes', 'bytes') 62 AddOneResult('decoded_audio_bytes', 'bytes')
62 AddOneResult('decoded_video_bytes', 'bytes') 63 AddOneResult('decoded_video_bytes', 'bytes')
63 AddOneResult('decoded_frame_count', 'frames') 64 AddOneResult('decoded_frame_count', 'frames')
64 AddOneResult('dropped_frame_count', 'frames') 65 AddOneResult('dropped_frame_count', 'frames')
65 AddOneResult('playback_time', 'sec') 66 AddOneResult('playback_time', 'sec')
66 AddOneResult('seek', 'sec') 67 AddOneResult('seek', 'sec')
67 AddOneResult('time_to_play', 'sec') 68 AddOneResult('time_to_play', 'sec')
68 69
OLDNEW
« no previous file with comments | « tools/perf/metrics/media.js ('k') | tools/telemetry/telemetry/page/actions/loop.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698