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

Unified Diff: tracing/tracing/metrics/system_health/scroll_power_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/scroll_power_metric.html
diff --git a/tracing/tracing/metrics/system_health/scroll_power_metric.html b/tracing/tracing/metrics/system_health/scroll_power_metric.html
index 338cf0b37501dc08ae77ae8c85d4e0cd4e4847cb..a070ba38c466f24eeaaefe66d19e42f862c047f3 100644
--- a/tracing/tracing/metrics/system_health/scroll_power_metric.html
+++ b/tracing/tracing/metrics/system_health/scroll_power_metric.html
@@ -8,7 +8,6 @@ found in the LICENSE file.
<link rel="import" href="/tracing/base/statistics.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';
@@ -17,12 +16,15 @@ tr.exportTo('tr.metrics.sh', function() {
function scrollPowerMetric(values, model) {
if (!model.device.powerSeries)
return;
- var timeHist = new tr.v.Histogram(
+ var timeHist = new tr.v.Histogram('time:scroll',
tr.b.Unit.byName.timeDurationInMs_smallerIsBetter)
- var energyHist = new tr.v.Histogram(
+ timeHist.description = 'Time spent in scrolling';
+ var energyHist = new tr.v.Histogram('energy:scroll',
tr.b.Unit.byName.energyInJoules_smallerIsBetter)
- var powerHist = new tr.v.Histogram(
+ energyHist.description = 'Energy consumed by scrolling';
+ var powerHist = new tr.v.Histogram('power:scroll',
tr.b.Unit.byName.powerInWatts_smallerIsBetter)
+ powerHist.description = 'Energy consumption rate in scrolling';
timeHist.customizeSummaryOptions({
avg: false,
@@ -66,14 +68,9 @@ tr.exportTo('tr.metrics.sh', function() {
}
}
- values.addValue(new tr.v.NumericValue('time:scroll',
- timeHist, {description: 'Time spent in scrolling'}));
-
- values.addValue(new tr.v.NumericValue('energy:scroll',
- energyHist, {description: 'Energy consumed by scrolling'}));
-
- values.addValue(new tr.v.NumericValue('power:scroll',
- powerHist, {description: 'Energy consumption rate in scrolling'}));
+ values.addHistogram(timeHist);
+ values.addHistogram(energyHist);
+ values.addHistogram(powerHist);
}
tr.metrics.MetricRegistry.register(scrollPowerMetric);

Powered by Google App Engine
This is Rietveld 408576698