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

Unified Diff: tools/perf/metrics/webrtc_stats_unittest.py

Issue 2522183002: Add encode time to WebRTC telemetry tests, remove some noisy metrics. (Closed)
Patch Set: Fixed unit test Created 4 years, 1 month 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 | « tools/perf/metrics/webrtc_stats.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/webrtc_stats_unittest.py
diff --git a/tools/perf/metrics/webrtc_stats_unittest.py b/tools/perf/metrics/webrtc_stats_unittest.py
index 517a5b0fe573f6e2077d1d1581078bb284584bc4..d24b130042f0adbc8dc85633aa639888e9ef744a 100644
--- a/tools/perf/metrics/webrtc_stats_unittest.py
+++ b/tools/perf/metrics/webrtc_stats_unittest.py
@@ -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)
« no previous file with comments | « tools/perf/metrics/webrtc_stats.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698