OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import json | 5 import json |
6 import logging | 6 import logging |
7 import re | 7 import re |
8 | 8 |
9 from metrics import Metric | |
10 from telemetry.core import camel_case | 9 from telemetry.core import camel_case |
11 from telemetry.value import list_of_scalar_values | 10 from telemetry.value import list_of_scalar_values |
12 | 11 |
| 12 from metrics import Metric |
| 13 |
| 14 |
13 INTERESTING_METRICS = { | 15 INTERESTING_METRICS = { |
14 'packetsReceived': { | 16 'packetsReceived': { |
15 'units': 'packets', | 17 'units': 'packets', |
16 'description': 'Packets received by the peer connection', | 18 'description': 'Packets received by the peer connection', |
17 }, | 19 }, |
18 'packetsSent': { | 20 'packetsSent': { |
19 'units': 'packets', | 21 'units': 'packets', |
20 'description': 'Packets sent by the peer connection', | 22 'description': 'Packets sent by the peer connection', |
21 }, | 23 }, |
22 'googDecodeMs': { | 24 'googDecodeMs': { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 94 |
93 for stat_name, values in time_series.iteritems(): | 95 for stat_name, values in time_series.iteritems(): |
94 stat_name_underscored = camel_case.ToUnderscore(stat_name) | 96 stat_name_underscored = camel_case.ToUnderscore(stat_name) |
95 trace_name = 'peer_connection_%d_%s' % (i, stat_name_underscored) | 97 trace_name = 'peer_connection_%d_%s' % (i, stat_name_underscored) |
96 general_name = StripAudioVideoDistinction(stat_name) | 98 general_name = StripAudioVideoDistinction(stat_name) |
97 results.AddValue(list_of_scalar_values.ListOfScalarValues( | 99 results.AddValue(list_of_scalar_values.ListOfScalarValues( |
98 results.current_page, trace_name, | 100 results.current_page, trace_name, |
99 INTERESTING_METRICS[general_name]['units'], values, | 101 INTERESTING_METRICS[general_name]['units'], values, |
100 description=INTERESTING_METRICS[general_name]['description'], | 102 description=INTERESTING_METRICS[general_name]['description'], |
101 important=False)) | 103 important=False)) |
OLD | NEW |