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

Unified Diff: tracing/tracing/metrics/sample_metric.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/sample_metric.html
diff --git a/tracing/tracing/metrics/sample_metric.html b/tracing/tracing/metrics/sample_metric.html
index 10932535ce4bfb94b245bf27e95fc0eaec42ae57..34e0c700c9c2bb22cebf425cba0f42adc86bb565 100644
--- a/tracing/tracing/metrics/sample_metric.html
+++ b/tracing/tracing/metrics/sample_metric.html
@@ -8,14 +8,14 @@ found in the LICENSE file.
<link rel="import" href="/tracing/base/range.html">
<link rel="import" href="/tracing/metrics/metric_registry.html">
<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/value.html">
<script>
'use strict';
tr.exportTo('tr.metrics', function() {
function sampleMetric(values, model) {
- var hist = new tr.v.Histogram(tr.b.Unit.byName.sizeInBytes_smallerIsBetter);
+ var hist = new tr.v.Histogram(
+ 'foo', tr.b.Unit.byName.sizeInBytes_smallerIsBetter);
hist.addSample(9);
hist.addSample(91, {bar: new tr.v.d.Generic({hello: 42})});
@@ -33,7 +33,7 @@ tr.exportTo('tr.metrics', function() {
tr.b.iterItems(model.processes, function(pid, process) {
});
- values.addValue(new tr.v.NumericValue('foo', hist));
+ values.addHistogram(hist);
}
tr.metrics.MetricRegistry.register(sampleMetric);

Powered by Google App Engine
This is Rietveld 408576698