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

Unified Diff: tools/perf/measurements/webrtc.py

Issue 738973005: Measure video stats for WebRTC calls to ensure video works. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now excluding metrics that aren't hooked up for WebRTC video tags. Created 6 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 | « no previous file | tools/perf/metrics/media.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/webrtc.py
diff --git a/tools/perf/measurements/webrtc.py b/tools/perf/measurements/webrtc.py
index 5b8680ba3ae1a41ecbaed0a6e05114d473f5a5fa..feb6f827555b1b3d7e73a228aa92a4c8b13f42c3 100644
--- a/tools/perf/measurements/webrtc.py
+++ b/tools/perf/measurements/webrtc.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
from metrics import cpu
+from metrics import media
from metrics import memory
from metrics import power
from metrics import webrtc_stats
@@ -15,6 +16,7 @@ class WebRTC(page_test.PageTest):
def __init__(self):
super(WebRTC, self).__init__('RunPageInteractions')
self._cpu_metric = None
+ self._media_metric = None
self._memory_metric = None
self._power_metric = None
self._webrtc_stats_metric = None
@@ -29,6 +31,8 @@ class WebRTC(page_test.PageTest):
def DidNavigateToPage(self, page, tab):
self._cpu_metric.Start(page, tab)
+ self._media_metric = media.MediaMetric(tab)
+ self._media_metric.Start(page, tab)
self._memory_metric.Start(page, tab)
self._power_metric.Start(page, tab)
self._webrtc_stats_metric.Start(page, tab)
@@ -41,12 +45,18 @@ class WebRTC(page_test.PageTest):
def ValidateAndMeasurePage(self, page, tab, results):
"""Measure the page's performance."""
- self._memory_metric.Stop(page, tab)
- self._memory_metric.AddResults(tab, results)
-
self._cpu_metric.Stop(page, tab)
self._cpu_metric.AddResults(tab, results)
+ # Add all media metrics except bytes (those aren't hooked up for WebRTC
+ # video tags).
+ exclude_metrics = ['decoded_video_bytes', 'decoded_audio_bytes']
+ self._media_metric.Stop(page, tab)
+ self._media_metric.AddResults(tab, results, exclude_metrics=exclude_metrics)
+
+ self._memory_metric.Stop(page, tab)
+ self._memory_metric.AddResults(tab, results)
+
self._power_metric.Stop(page, tab)
self._power_metric.AddResults(tab, results)
« no previous file with comments | « no previous file | tools/perf/metrics/media.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698