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

Unified Diff: tracing/tracing/metrics/metric_registry_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
« no previous file with comments | « tracing/tracing/metrics/metric_map_function.html ('k') | tracing/tracing/metrics/sample_metric.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/metric_registry_test.html
diff --git a/tracing/tracing/metrics/metric_registry_test.html b/tracing/tracing/metrics/metric_registry_test.html
index 7019137e3313d5c2216d8845c34a99455ab823bb..135f2518a8b34db1f8a5dd2b1b67d98a9f4ff459 100644
--- a/tracing/tracing/metrics/metric_registry_test.html
+++ b/tracing/tracing/metrics/metric_registry_test.html
@@ -8,7 +8,6 @@ found in the LICENSE file.
<link rel="import" href="/tracing/core/test_utils.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';
@@ -16,32 +15,32 @@ found in the LICENSE file.
tr.b.unittest.testSuite(function() {
test('FindMetricByName', function() {
function sampleMetricA(values, model) {
- var n1 = new tr.v.Histogram(tr.b.Unit.byName.count);
+ var n1 = new tr.v.Histogram('foo', tr.b.Unit.byName.count);
n1.addSample(1);
- values.addValue(new tr.v.NumericValue('foo', n1));
+ values.addHistogram(n1);
}
tr.metrics.MetricRegistry.register(sampleMetricA);
function sampleMetricB(values, model) {
- var n1 = new tr.v.Histogram(tr.b.Unit.byName.count);
- var n2 = new tr.v.Histogram(tr.b.Unit.byName.count);
+ var n1 = new tr.v.Histogram('foo', tr.b.Unit.byName.count);
+ var n2 = new tr.v.Histogram('bar', tr.b.Unit.byName.count);
n1.addSample(1);
n2.addSample(2);
- values.addValue(new tr.v.NumericValue('foo', n1));
- values.addValue(new tr.v.NumericValue('bar', n2));
+ values.addHistogram(n1);
+ values.addHistogram(n2);
}
tr.metrics.MetricRegistry.register(sampleMetricB);
function sampleMetricC(values, model) {
- var n1 = new tr.v.Histogram(tr.b.Unit.byName.count);
- var n2 = new tr.v.Histogram(tr.b.Unit.byName.count);
- var n3 = new tr.v.Histogram(tr.b.Unit.byName.count);
+ var n1 = new tr.v.Histogram('foo', tr.b.Unit.byName.count);
+ var n2 = new tr.v.Histogram('bar', tr.b.Unit.byName.count);
+ var n3 = new tr.v.Histogram('baz', tr.b.Unit.byName.count);
n1.addSample(1);
n2.addSample(2);
n3.addSample(3);
- values.addValue(new tr.v.NumericValue('foo', n1));
- values.addValue(new tr.v.NumericValue('bar', n2));
- values.addValue(new tr.v.NumericValue('baz', n3));
+ values.addHistogram(n1);
+ values.addHistogram(n2);
+ values.addHistogram(n3);
}
tr.metrics.MetricRegistry.register(sampleMetricC);
« no previous file with comments | « tracing/tracing/metrics/metric_map_function.html ('k') | tracing/tracing/metrics/sample_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698