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

Side by Side Diff: tracing/tracing/metrics/blink/gc_metric.html

Issue 2656493002: Register metric Histogram names. (Closed)
Patch Set: rebase Created 3 years, 10 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 7
8 <link rel="import" href="/tracing/base/range.html"> 8 <link rel="import" href="/tracing/base/range.html">
9 <link rel="import" href="/tracing/base/unit.html"> 9 <link rel="import" href="/tracing/base/unit.html">
10 <link rel="import" href="/tracing/metrics/metric_registry.html"> 10 <link rel="import" href="/tracing/metrics/metric_registry.html">
(...skipping 19 matching lines...) Expand all
30 return BLINK_GC_EVENTS[event.title]; 30 return BLINK_GC_EVENTS[event.title];
31 } 31 }
32 32
33 function blinkGcMetric(values, model) { 33 function blinkGcMetric(values, model) {
34 addDurationOfTopEvents(values, model); 34 addDurationOfTopEvents(values, model);
35 addTotalDurationOfTopEvents(values, model); 35 addTotalDurationOfTopEvents(values, model);
36 addIdleTimesOfTopEvents(values, model); 36 addIdleTimesOfTopEvents(values, model);
37 addTotalIdleTimesOfTopEvents(values, model); 37 addTotalIdleTimesOfTopEvents(values, model);
38 } 38 }
39 39
40 tr.metrics.MetricRegistry.register(blinkGcMetric); 40 tr.metrics.MetricRegistry.register(blinkGcMetric, {
41 histogramNames: new Set([]),
42 });
41 43
42 var timeDurationInMs_smallerIsBetter = 44 var timeDurationInMs_smallerIsBetter =
43 tr.b.Unit.byName.timeDurationInMs_smallerIsBetter; 45 tr.b.Unit.byName.timeDurationInMs_smallerIsBetter;
44 var percentage_biggerIsBetter = 46 var percentage_biggerIsBetter =
45 tr.b.Unit.byName.normalizedPercentage_biggerIsBetter; 47 tr.b.Unit.byName.normalizedPercentage_biggerIsBetter;
46 48
47 // 0.1 steps from 0 to 20 since it is the most common range. 49 // 0.1 steps from 0 to 20 since it is the most common range.
48 // Exponentially increasing steps from 20 to 200. 50 // Exponentially increasing steps from 20 to 200.
49 var CUSTOM_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(0, 20, 200) 51 var CUSTOM_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(0, 20, 200)
50 .addExponentialBins(200, 100); 52 .addExponentialBins(200, 100);
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 var percentage = createPercentage( 192 var percentage = createPercentage(
191 name + '_percentage_idle', insideIdle.sum, cpuDuration.sum); 193 name + '_percentage_idle', insideIdle.sum, cpuDuration.sum);
192 values.addHistogram(percentage); 194 values.addHistogram(percentage);
193 } 195 }
194 196
195 return { 197 return {
196 blinkGcMetric, 198 blinkGcMetric,
197 }; 199 };
198 }); 200 });
199 </script> 201 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/all_histogram_names_cmdline.html ('k') | tracing/tracing/metrics/cpu_process_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698