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

Unified Diff: tracing/tracing/metrics/system_health/cpu_time_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/system_health/cpu_time_metric.html
diff --git a/tracing/tracing/metrics/system_health/cpu_time_metric.html b/tracing/tracing/metrics/system_health/cpu_time_metric.html
index eed94f0365adb8168b9e73d6055be8cbc707bb91..b655f1e57ecac9cef672093e14864a98364af761 100644
--- a/tracing/tracing/metrics/system_health/cpu_time_metric.html
+++ b/tracing/tracing/metrics/system_health/cpu_time_metric.html
@@ -7,7 +7,6 @@ found in the LICENSE file.
<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';
@@ -58,16 +57,11 @@ tr.exportTo('tr.metrics.sh', function() {
var unit = tr.b.Unit.byName.timeDurationInMs_smallerIsBetter;
var boundaries = tr.v.HistogramBinBoundaries
.createExponential(1, 100000, 200)
- var cpuTimeNumeric = new tr.v.Histogram(unit, boundaries);
+ var cpuTimeNumeric = new tr.v.Histogram('cpu_time', unit, boundaries);
+ cpuTimeNumeric.description =
+ 'Total CPU time on all Chrome processes, per second of clock time.';
cpuTimeNumeric.addSample(normalizedAllProcessCpuTime);
-
- var options = {
- description: 'Total CPU time on all Chrome processes, per second of ' +
- 'clock time.'
- };
- var threadTimesValue = new tr.v.NumericValue(
- 'cpu_time', cpuTimeNumeric, options);
- values.addValue(threadTimesValue);
+ values.addHistogram(cpuTimeNumeric);
}
tr.metrics.MetricRegistry.register(cpuTimeMetric, {
@@ -79,4 +73,3 @@ tr.exportTo('tr.metrics.sh', function() {
};
});
</script>
-

Powered by Google App Engine
This is Rietveld 408576698