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

Unified Diff: tracing/tracing/metrics/system_health/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/power_metric.html
diff --git a/tracing/tracing/metrics/system_health/power_metric.html b/tracing/tracing/metrics/system_health/power_metric.html
index 2099458a5ac86ff69d230c04c96960871e6d1702..4913ef567d5a5215323de85f50e218c78a43ff36 100644
--- a/tracing/tracing/metrics/system_health/power_metric.html
+++ b/tracing/tracing/metrics/system_health/power_metric.html
@@ -9,7 +9,6 @@ found in the LICENSE file.
<link rel="import" href="/tracing/metrics/metric_registry.html">
<link rel="import" href="/tracing/metrics/system_health/clock_sync_latency_metric.html">
<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/value.html">
<script>
'use strict';
@@ -21,9 +20,11 @@ tr.exportTo('tr.metrics.sh', function() {
tr.b.UnitScale.Metric.NONE, tr.b.UnitScale.Metric.MILLI);
function energyConsumedPerFrame(valueList, model) {
- var frameEnergyConsumedInJ = new tr.v.Histogram(
+ var frameEnergyConsumedInJ = new tr.v.Histogram('energy_consumed_per_frame',
tr.b.Unit.byName.energyInJoules_smallerIsBetter,
tr.v.HistogramBinBoundaries.createLinear(0, 0.5, 20));
+ frameEnergyConsumedInJ.description =
+ 'Energy consumption per frame in joules';
var frameStartTs = parseFloat(model.device.powerSeries.samples[0].start);
while (model.device.powerSeries.getSamplesWithinRange(
@@ -34,9 +35,7 @@ tr.exportTo('tr.metrics.sh', function() {
frameEnergyConsumedInJ.addSample(currentFrameEnergy);
}
- valueList.addValue(new tr.v.NumericValue(
- 'energy_consumed_per_frame', frameEnergyConsumedInJ,
- {description: 'Energy consumption per frame in joules'}));
+ valueList.addHistogram(frameEnergyConsumedInJ);
}
function powerMetric(valueList, model) {

Powered by Google App Engine
This is Rietveld 408576698