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

Unified Diff: tracing/tracing/metrics/system_health/hazard_metric_test.html

Issue 2334233003: Merge NumericValue into Histogram (Closed)
Patch Set: fix rail_power_metric Created 4 years, 3 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/system_health/hazard_metric_test.html
diff --git a/tracing/tracing/metrics/system_health/hazard_metric_test.html b/tracing/tracing/metrics/system_health/hazard_metric_test.html
index c6e0ed340bbee2f55bccb7430221183b888a662f..f89d10f4aa1b1e20d5e5a98386629ee0c466b55d 100644
--- a/tracing/tracing/metrics/system_health/hazard_metric_test.html
+++ b/tracing/tracing/metrics/system_health/hazard_metric_test.html
@@ -24,10 +24,7 @@ tr.b.unittest.testSuite(function() {
});
var values = new tr.v.ValueSet();
tr.metrics.sh.hazardMetric(values, model);
- assert.equal(1, values.length);
- for (var value of values)
- if (value.numeric instanceof tr.v.Histogram)
- return value;
+ return tr.b.getOnlyElement(values);
}
test('minimalHazard', function() {
@@ -40,8 +37,8 @@ tr.b.unittest.testSuite(function() {
duration: duration
}));
});
- assert.notEqual(0, value.numeric.average);
- assert.closeTo(value.numeric.average, 0.1611, 1e-5);
+ assert.notEqual(0, value.average);
+ assert.closeTo(value.average, 0.1611, 1e-5);
});
test('maximalHazard', function() {
@@ -53,7 +50,7 @@ tr.b.unittest.testSuite(function() {
duration: 2200
}));
});
- assert.closeTo(value.numeric.average, 1, 1e-5);
+ assert.closeTo(value.average, 1, 1e-5);
});
test('blendedHazards', function() {
@@ -83,7 +80,7 @@ tr.b.unittest.testSuite(function() {
duration: 400
}));
});
- assert.closeTo(0.92144, value.numeric.average, 1e-4);
+ assert.closeTo(0.92144, value.average, 1e-4);
});
});
</script>
« no previous file with comments | « tracing/tracing/metrics/system_health/hazard_metric.html ('k') | tracing/tracing/metrics/system_health/loading_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698