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

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

Issue 2790553003: Use a single benchmark for WebRTC telemetry tests. (Closed)
Patch Set: Rebase Created 3 years, 7 months 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/benchmark.csv ('k') | tools/perf/core/benchmark_sharding_map.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/webrtc.py
diff --git a/tools/perf/benchmarks/webrtc.py b/tools/perf/benchmarks/webrtc.py
index ea1e127fa36b6f6d2e616ee582ebcafcb1330f30..04aee6ff1fff8979fcdfc8efb72d1781710bcd5a 100644
--- a/tools/perf/benchmarks/webrtc.py
+++ b/tools/perf/benchmarks/webrtc.py
@@ -4,115 +4,42 @@
from core import perf_benchmark
-from measurements import webrtc
import page_sets
from telemetry import benchmark
from telemetry.timeline import chrome_trace_category_filter
from telemetry.web_perf import timeline_based_measurement
-from telemetry.web_perf.metrics import webrtc_rendering_timeline
-RENDERING_VALUE_PREFIX = 'WebRTCRendering_'
-# TODO(qyearsley, mcasas): Add webrtc.audio when http://crbug.com/468732
-# is fixed, or revert https://codereview.chromium.org/1544573002/ when
-# http://crbug.com/568333 is fixed.
-
-
-class _Webrtc(perf_benchmark.PerfBenchmark):
+@benchmark.Owner(emails=['qiangchen@chromium.org', # For smoothness metrics
+ 'ehmaldonado@chromium.org',
+ 'phoglund@chromium.org'])
+class WebrtcPerfBenchmark(perf_benchmark.PerfBenchmark):
"""Base class for WebRTC metrics for real-time communications tests."""
- test = webrtc.WebRTC
-
-
-class WebrtcGetusermedia(_Webrtc):
- """Measures WebRtc GetUserMedia for video capture and local playback."""
- page_set = page_sets.WebrtcGetusermediaPageSet
-
- @classmethod
- def Name(cls):
- return 'webrtc.getusermedia'
-
-
-class WebrtcPeerConnection(_Webrtc):
- """Measures WebRtc Peerconnection for remote video and audio communication."""
- page_set = page_sets.WebrtcPeerconnectionPageSet
-
- @classmethod
- def Name(cls):
- return 'webrtc.peerconnection'
-
-
-@benchmark.Owner(emails=['phoglund@chromium.org'])
-class WebrtcDataChannel(_Webrtc):
- """Measures WebRtc DataChannel loopback."""
- page_set = page_sets.WebrtcDatachannelPageSet
-
- @classmethod
- def Name(cls):
- return 'webrtc.datachannel'
-
-
-@benchmark.Disabled('win')
-@benchmark.Owner(emails=['ehmaldonado@chromium.org', 'phoglund@chromium.org'])
-class WebrtcStressTest(perf_benchmark.PerfBenchmark):
- """Measures WebRtc CPU and GPU usage with multiple peer connections."""
- page_set = page_sets.WebrtcStresstestPageSet
+ page_set = page_sets.WebrtcPageSet
@classmethod
def Name(cls):
- return 'webrtc.stress'
-
- def CreatePageTest(self, options):
- # Exclude all stats.
- return webrtc.WebRTC(particular_metrics=['googAvgEncodeMs',
- 'googFrameRateReceived'])
-
-
-# WebrtcRendering must be a PerfBenchmark, and not a _Webrtc, because it is a
-# timeline-based.
-# Disabled on reference builds because they crash and don't support tab
-# capture. See http://crbug.com/603232.
-@benchmark.Disabled('reference')
-@benchmark.Disabled('android') # http://crbug.com/610019
-@benchmark.Owner(emails=['qiangchen@chromium.org'])
-class WebrtcRendering(perf_benchmark.PerfBenchmark):
- """Specific time measurements (e.g. fps, smoothness) for WebRtc rendering."""
-
- page_set = page_sets.WebrtcRenderingPageSet
+ return 'webrtc.perf_benchmark'
nednguyen 2017/05/15 16:55:00 Just name this webrtc. The 'perf_benchmark' part d
ehmaldonado_chromium 2017/05/16 08:36:28 Done.
def CreateTimelineBasedMeasurementOptions(self):
- category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
- filter_string='webrtc,webkit.console,blink.console')
- options = timeline_based_measurement.Options(category_filter)
- options.SetLegacyTimelineBasedMetrics(
- [webrtc_rendering_timeline.WebRtcRenderingTimelineMetric()])
- return options
-
- def SetExtraBrowserOptions(self, options):
- options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream')
- options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream')
+ categories = [
+ # Disable all categories by default.
+ '-*',
+ # EQT categories
+ # 'blink.user_timing',
+ # 'loading',
+ # 'navigation',
+ # 'toplevel',
nednguyen 2017/05/15 16:55:00 Without 'toplevel', cpuTimeMetric doesn't work
ehmaldonado_chromium 2017/05/16 08:36:28 Acknowledged.
+ # WebRTC
+ 'webrtc',
+ ]
- @classmethod
- def Name(cls):
- return 'webrtc.webrtc_smoothness'
-
-
-# WebrtcRenderingTBMv2 must be a PerfBenchmark, and not a _Webrtc, because it is
-# a timeline-based metric.
-@benchmark.Owner(emails=['ehmaldonado@chromium.org',
- 'phoglund@chromium.org',
- 'qiangchen@chromium.org'])
-class WebrtcRenderingTBMv2(perf_benchmark.PerfBenchmark):
- """Specific time measurements (e.g. fps, smoothness) for WebRtc rendering."""
-
- page_set = page_sets.WebrtcRenderingPageSet
-
- def CreateTimelineBasedMeasurementOptions(self):
category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
- filter_string='webrtc,toplevel')
+ filter_string=','.join(categories))
options = timeline_based_measurement.Options(category_filter)
options.SetTimelineBasedMetrics([
'cpuTimeMetric',
- 'expectedQueueingTimeMetric',
+ # 'expectedQueueingTimeMetric',
nednguyen 2017/05/15 16:55:00 Add comment linking to bug to enable this
ehmaldonado_chromium 2017/05/16 08:36:28 The bug seems to have been fixed in https://codere
'webrtcRenderingMetric',
])
return options
@@ -120,7 +47,3 @@ class WebrtcRenderingTBMv2(perf_benchmark.PerfBenchmark):
def SetExtraBrowserOptions(self, options):
options.AppendExtraBrowserArgs('--use-fake-device-for-media-stream')
options.AppendExtraBrowserArgs('--use-fake-ui-for-media-stream')
-
- @classmethod
- def Name(cls):
- return 'webrtc.webrtc_smoothness_tbmv2'
« no previous file with comments | « tools/perf/benchmark.csv ('k') | tools/perf/core/benchmark_sharding_map.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698