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

Side by Side Diff: tracing/tracing/metrics/sample_metric.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 <link rel="import" href="/tracing/base/range.html"> 7 <link rel="import" href="/tracing/base/range.html">
8 <link rel="import" href="/tracing/metrics/metric_registry.html"> 8 <link rel="import" href="/tracing/metrics/metric_registry.html">
9 <link rel="import" href="/tracing/value/numeric.html"> 9 <link rel="import" href="/tracing/value/numeric.html">
10 <link rel="import" href="/tracing/value/value.html"> 10 <link rel="import" href="/tracing/value/value.html">
(...skipping 11 matching lines...) Expand all
22 function sampleMetric(values, model) { 22 function sampleMetric(values, model) {
23 var n1 = new tr.v.ScalarNumeric(sizeInBytes_smallerIsBetter, 1); 23 var n1 = new tr.v.ScalarNumeric(sizeInBytes_smallerIsBetter, 1);
24 var n2 = new tr.v.ScalarNumeric(sizeInBytes_smallerIsBetter, 2); 24 var n2 = new tr.v.ScalarNumeric(sizeInBytes_smallerIsBetter, 2);
25 var n3 = SIZE_NUMERIC_BUILDER.build(); 25 var n3 = SIZE_NUMERIC_BUILDER.build();
26 n3.add(1); 26 n3.add(1);
27 values.addValue(new tr.v.NumericValue('foo', n1)); 27 values.addValue(new tr.v.NumericValue('foo', n1));
28 values.addValue(new tr.v.NumericValue('bar', n2)); 28 values.addValue(new tr.v.NumericValue('bar', n2));
29 values.addValue(new tr.v.NumericValue('baz', n3)); 29 values.addValue(new tr.v.NumericValue('baz', n3));
30 } 30 }
31 31
32 function sampleMetric2(values, model) {
33 var n1 = new tr.v.ScalarNumeric(sizeInBytes_smallerIsBetter, 1);
34 var n2 = new tr.v.ScalarNumeric(sizeInBytes_smallerIsBetter, 2);
35 var n3 = SIZE_NUMERIC_BUILDER.build();
36 n3.add(1);
37 values.addValue(new tr.v.NumericValue('one', n1));
38 values.addValue(new tr.v.NumericValue('two', n2));
39 values.addValue(new tr.v.NumericValue('three', n3));
40 }
41
32 tr.metrics.MetricRegistry.register(sampleMetric); 42 tr.metrics.MetricRegistry.register(sampleMetric);
43 tr.metrics.MetricRegistry.register(sampleMetric2);
33 44
34 return { 45 return {
35 sampleMetric: sampleMetric 46 sampleMetric: sampleMetric,
47 sampleMetric2: sampleMetric2
36 }; 48 };
37 }); 49 });
38 </script> 50 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/metric_runner.py ('k') | tracing/tracing/metrics/system_health/clock_sync_latency_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698