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

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

Issue 2293533002: Refactor NumericBuilder to HistogramBinBoundaries. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: rebase Created 4 years, 4 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.html
diff --git a/tracing/tracing/metrics/system_health/hazard_metric.html b/tracing/tracing/metrics/system_health/hazard_metric.html
index ce65210561ecb834f16621267a40efec3cfe59c4..03290400fc62e8e9006d26e232f9e6651d9fe96c 100644
--- a/tracing/tracing/metrics/system_health/hazard_metric.html
+++ b/tracing/tracing/metrics/system_health/hazard_metric.html
@@ -14,10 +14,6 @@ found in the LICENSE file.
'use strict';
tr.exportTo('tr.metrics.sh', function() {
- var NUMERIC_BUILDER = tr.v.NumericBuilder.createLinear(
- tr.v.Unit.byName.normalizedPercentage_smallerIsBetter,
- tr.b.Range.fromExplicitRange(0, 1), 20);
-
// The following math is easier if the units are seconds rather than ms,
// so durations will be converted from ms to s.
var MS_PER_S = 1000;
@@ -128,7 +124,8 @@ tr.exportTo('tr.metrics.sh', function() {
if (overallHazard === undefined)
overallHazard = 0;
- var hist = NUMERIC_BUILDER.build();
+ var hist = new tr.v.Histogram(
+ tr.v.Unit.byName.normalizedPercentage_smallerIsBetter);
hist.add(overallHazard);
values.addValue(new tr.v.NumericValue('hazard', hist));
}

Powered by Google App Engine
This is Rietveld 408576698