Commit e1ccb8f9 authored by phoglund's avatar phoglund Committed by Commit bot

Add encode time to WebRTC telemetry tests, remove some noisy metrics.

Note that webrtc.stress doesn't measure stats at all (yet), so that
needs to happen if we decide to go the Telemetry path. See discussion
in the bug.

BUG=632299

Review-Url: https://codereview.chromium.org/2522183002
Cr-Commit-Position: refs/heads/master@{#435012}
parent 459c7c57
......@@ -13,14 +13,6 @@ from metrics import Metric
INTERESTING_METRICS = {
'packetsReceived': {
'units': 'packets',
'description': 'Packets received by the peer connection',
},
'packetsSent': {
'units': 'packets',
'description': 'Packets sent by the peer connection',
},
'googDecodeMs': {
'units': 'ms',
'description': 'Time spent decoding.',
......@@ -29,6 +21,10 @@ INTERESTING_METRICS = {
'units': 'ms',
'description': 'Maximum time spent decoding one frame.',
},
'googAvgEncodeMs': {
'units': 'ms',
'description': 'Average time spent encoding one frame.'
},
'googRtt': {
'units': 'ms',
'description': 'Measured round-trip time.',
......@@ -71,10 +67,6 @@ INTERESTING_METRICS = {
'description': ('The target encoding bitrate we estimate is good to '
'aim for given our bandwidth estimates.')
},
'googTransmitBitrate': {
'units': 'bit/s',
'description': 'The actual transmit bitrate.'
},
}
......
......@@ -129,13 +129,14 @@ class WebRtcStatsUnittest(unittest.TestCase):
self.assertTrue(results.received_values,
'Expected values for googDecodeMs and others, got none.')
# This also ensures we're clever enough to tell video packetsSent from audio
# packetsSent.
self.assertEqual(results.received_values[3].values,
[4.0, 16.0])
self.assertEqual(results.received_values[5].values,
[1.0, 8.0])
self.assertEqual(results.received_values[1].name,
'peer_connection_0_audio_goog_rtt')
self.assertEqual(results.received_values[1].values,
[20.0, 17.0])
self.assertEqual(results.received_values[7].name,
'peer_connection_1_video_goog_rtt')
self.assertEqual(results.received_values[7].values,
[100.0, 101.0])
def testExtractsInterestingMetricsOnly(self):
results = self._RunMetricOnJson(SAMPLE_JSON)
......@@ -145,9 +146,9 @@ class WebRtcStatsUnittest(unittest.TestCase):
'The result should be a ListOfScalarValues instance with '
'a name <peer connection id>_<statistic>.')
all_names = [value.name for value in results.received_values]
self.assertIn('peer_connection_0_video_packets_sent', all_names)
self.assertNotIn('peer_connection_1_video_packets_sent', all_names,
'Peer connection 1 does not have a video packets sent in '
self.assertIn('peer_connection_0_audio_goog_rtt', all_names)
self.assertNotIn('peer_connection_1_audio_goog_rtt', all_names,
'Peer connection 1 does not have a goog-rtt in '
'the JSON above, unlike peer connection 0 which does.')
self.assertIn('peer_connection_0_video_goog_rtt', all_names)
self.assertIn('peer_connection_1_video_goog_rtt', all_names)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment