Implements peer connection stats measurements in WebRTC call test.
commit1d2d8d71fc4ce119e6847a8c8aa667cf003c87ad
authorphoglund <phoglund@chromium.org>
Mon, 20 Oct 2014 11:40:50 +0000 (20 04:40 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 20 Oct 2014 11:41:07 +0000 (20 11:41 +0000)
tree0dc751732ad1cbbf5ce0028bd032dd6f29d1df00
parentc78637e034c8df88abd12e7c11c1b7f12a1d1eb7
Implements peer connection stats measurements in WebRTC call test.

The telemetry test for WebRTC has so far been measuring CPU and memory.
Since there's a stats API for WebRTC (see http://goo.gl/lfQKzE), we try
to use that do extract interesting properties about the call. The
properties we look at are such that we expect them to remain stable, so
a sudden change in any of them will warrant investigation.

This implementation is based on a trick where we instrument the
constructor for webkitRTCPeerConnection. Whenever a peer connection is
constructed, we attach a polling function which periodically polls the
connection for new stats (that's how the stats API works). Then we
make it easy for a measurement to extract this data, aggregate it into
time series and report it through Telemetry.

BUG=412787

Review URL: https://codereview.chromium.org/561803002

Cr-Commit-Position: refs/heads/master@{#300249}
tools/perf/measurements/webrtc.py
tools/perf/metrics/webrtc_stats.py [new file with mode: 0644]
tools/perf/metrics/webrtc_stats_unittest.py [new file with mode: 0644]
tools/perf/page_sets/webrtc_cases.py
tools/perf/page_sets/webrtc_track_peerconnections.js [new file with mode: 0644]