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

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

Issue 2561603003: Add encoding time and and fps to webrtc.stress case. (Closed)
Patch Set: Don't log more than 5 conns Created 4 years 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/benchmarks/webrtc.py ('k') | tools/perf/metrics/webrtc_stats.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 9fff2ec1bee499874d3341d482f7a663e6d3c663..c2e399b448532fa48fea030ede71182646dc3423 100644
--- a/tools/perf/measurements/webrtc.py
+++ b/tools/perf/measurements/webrtc.py
@@ -13,12 +13,18 @@ from metrics import webrtc_stats
class WebRTC(legacy_page_test.LegacyPageTest):
"""Gathers WebRTC-related metrics on a page set."""
- def __init__(self, use_webrtc_stats=True):
+ def __init__(self, particular_metrics=None):
+ """Create the measurement and include selected stats.
+
+ Args:
+ particular_metrics: A list of the stats to include (see webrtc_stats.py
+ for a list of valid names) or None to select all metrics.
+ """
super(WebRTC, self).__init__()
self._cpu_metric = None
self._media_metric = None
self._power_metric = None
- self._use_webrtc_stats = use_webrtc_stats
+ self._particular_metrics = particular_metrics
self._webrtc_stats_metric = None
def WillStartBrowser(self, platform):
@@ -26,16 +32,15 @@ class WebRTC(legacy_page_test.LegacyPageTest):
def DidStartBrowser(self, browser):
self._cpu_metric = cpu.CpuMetric(browser)
- if self._use_webrtc_stats:
- self._webrtc_stats_metric = webrtc_stats.WebRtcStatisticsMetric()
+ self._webrtc_stats_metric = webrtc_stats.WebRtcStatisticsMetric(
+ self._particular_metrics)
def DidNavigateToPage(self, page, tab):
self._cpu_metric.Start(page, tab)
self._media_metric = media.MediaMetric(tab)
self._media_metric.Start(page, tab)
self._power_metric.Start(page, tab)
- if self._use_webrtc_stats:
- self._webrtc_stats_metric.Start(page, tab)
+ self._webrtc_stats_metric.Start(page, tab)
def CustomizeBrowserOptions(self, options):
options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream')
@@ -56,9 +61,8 @@ class WebRTC(legacy_page_test.LegacyPageTest):
self._power_metric.Stop(page, tab)
self._power_metric.AddResults(tab, results)
- if self._use_webrtc_stats:
- self._webrtc_stats_metric.Stop(page, tab)
- self._webrtc_stats_metric.AddResults(tab, results)
+ self._webrtc_stats_metric.Stop(page, tab)
+ self._webrtc_stats_metric.AddResults(tab, results)
def DidRunPage(self, platform):
del platform # unused
« no previous file with comments | « tools/perf/benchmarks/webrtc.py ('k') | tools/perf/metrics/webrtc_stats.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698