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

Unified Diff: tracing/tracing/metrics/webrtc/webrtc_rendering_metric_test.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 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
Index: tracing/tracing/metrics/webrtc/webrtc_rendering_metric_test.html
diff --git a/tracing/tracing/metrics/webrtc/webrtc_rendering_metric_test.html b/tracing/tracing/metrics/webrtc/webrtc_rendering_metric_test.html
index 9d1b0c413151be66c53108882dc5b2d42b921ebc..9b7af556f865c6099ba1179d766aa5049f32080d 100644
--- a/tracing/tracing/metrics/webrtc/webrtc_rendering_metric_test.html
+++ b/tracing/tracing/metrics/webrtc/webrtc_rendering_metric_test.html
@@ -171,19 +171,21 @@ tr.b.unittest.testSuite(function() {
// We don't have access to the values stored in the histogram, so we check
// for equality in the summary statistics.
let hist = histograms.getHistogramNamed('WebRTCRendering_drift_time');
- assert.strictEqual(hist.sum, tr.b.Statistics.sum(fakeDriftTimes));
+ assert.strictEqual(hist.sum, tr.b.math.Statistics.sum(fakeDriftTimes));
assert.strictEqual(hist.numValues, fakeDriftTimes.length);
- assert.strictEqual(hist.running.min, tr.b.Statistics.min(fakeDriftTimes));
- assert.strictEqual(hist.running.max, tr.b.Statistics.max(fakeDriftTimes));
+ assert.strictEqual(hist.running.min,
+ tr.b.math.Statistics.min(fakeDriftTimes));
+ assert.strictEqual(hist.running.max,
+ tr.b.math.Statistics.max(fakeDriftTimes));
assert.closeTo(hist.standardDeviation,
- tr.b.Statistics.stddev(fakeDriftTimes), 1e-2);
+ tr.b.math.Statistics.stddev(fakeDriftTimes), 1e-2);
});
test('framesBadlyOutOfSyncPerfect', function() {
// None of these will exceed the threshold for badly out of sync events,
// which is about 33 333.
let normDriftTimes = [-16700, 17640, 15000, -17640, -15000, 16700];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -197,7 +199,7 @@ tr.b.unittest.testSuite(function() {
// Only 34 000 will exceed the threshold for badly out of sync events,
// which is about 33 333.
let normDriftTimes = [-34000, 10000, 10000, 10000, 4000];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -211,7 +213,7 @@ tr.b.unittest.testSuite(function() {
// None of these will exceed the threshold for badly out of sync, which is
// about 16 667.
let normDriftTimes = [-16600, 15640, 15000, -15640, -15000, 16600];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -225,7 +227,7 @@ tr.b.unittest.testSuite(function() {
// Only 17000 will exceed the threshold for badly out of sync, which is
// about 16 667.
let normDriftTimes = [-17000, 5000, 5000, 5000, 2000];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -239,7 +241,7 @@ tr.b.unittest.testSuite(function() {
// None of these will exceed the threshold for badly out of sync events,
// which is about 33 333.
let normDriftTimes = [-16700, 17640, 15000, -17640, -15000, 16700];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -253,7 +255,7 @@ tr.b.unittest.testSuite(function() {
// Only 34 000 will exceed the threshold for badly out of sync events,
// which is about 33 333.
let normDriftTimes = [-34000, 10000, 10000, 10000, 4000];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -267,7 +269,7 @@ tr.b.unittest.testSuite(function() {
// None of these will exceed the threshold for badly out of sync, which is
// about 16 667.
let normDriftTimes = [-16600, 15640, 15000, -15640, -15000, 16600];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -281,7 +283,7 @@ tr.b.unittest.testSuite(function() {
// Only 17000 will exceed the threshold for badly out of sync, which is
// about 16 667.
let normDriftTimes = [-17000, 5000, 5000, 5000, 2000];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -295,7 +297,7 @@ tr.b.unittest.testSuite(function() {
// None of these will exceed the threshold for badly out of sync, which is
// about 16 667, so the smoothnessScore wil be perfect.
let normDriftTimes = [-16600, 15640, 15000, -15640, -15000, 16600];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -311,7 +313,7 @@ tr.b.unittest.testSuite(function() {
// 1 - (frames out of sync + 3 * frames badly out of sync) / n
// = 1 - (2 + 3) / 5 = 0
let normDriftTimes = [-17000, 34000, -17000, -10000, 10000];
- assert.strictEqual(tr.b.Statistics.sum(normDriftTimes), 0);
+ assert.strictEqual(tr.b.math.Statistics.sum(normDriftTimes), 0);
let fakeEvents = eventsFromNormDriftTimes(normDriftTimes);
let histograms = runWebrtcRenderingMetric(fakeEvents);
@@ -435,7 +437,7 @@ tr.b.unittest.testSuite(function() {
// The rendering length error is then the sum of the errors, normalized by
// the span between the first and the last Ideal Render Instants.
let idealRenderSpan = fakePairs[fakePairs.length - 1][0] - fakePairs[0][0];
- let expectedRenderingLengthError = tr.b.Statistics.sum(errors) /
+ let expectedRenderingLengthError = tr.b.math.Statistics.sum(errors) /
idealRenderSpan;
let fakeEvents = fakePairs.map(eventFromPair);
« no previous file with comments | « tracing/tracing/metrics/webrtc/webrtc_rendering_metric.html ('k') | tracing/tracing/model/async_slice_group.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698