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

Unified Diff: tracing/tracing/metrics/system_health/power_metric.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 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 27d9e78240a0a7a2a89be12a037d25864c0ef53d..d89bfb32f5d116227aaac89dbc221b712cceef61 100644
--- a/tracing/tracing/metrics/system_health/power_metric.html
+++ b/tracing/tracing/metrics/system_health/power_metric.html
@@ -55,13 +55,15 @@ tr.exportTo('tr.metrics.sh', function() {
}
function createHistograms_(data, interval, histograms) {
- if (data.histograms[interval.name] === undefined)
+ if (data.histograms[interval.name] === undefined) {
data.histograms[interval.name] = createEmptyHistogram_(interval,
histograms);
+ }
if (data.histograms[interval.name].perSecond) {
for (var sample of data.model.device.powerSeries.getSamplesWithinRange(
- interval.bounds.min, interval.bounds.max))
+ interval.bounds.min, interval.bounds.max)) {
data.histograms[interval.name].energy.addSample(sample.powerInW);
+ }
} else {
var energyInJ = data.model.device.powerSeries.getEnergyConsumedInJ(
interval.bounds.min, interval.bounds.max);
@@ -364,8 +366,9 @@ tr.exportTo('tr.metrics.sh', function() {
model: model,
histograms: {}
};
- for (var interval of computeTimeIntervals_(model))
+ for (var interval of computeTimeIntervals_(model)) {
createHistograms_(data, interval, histograms);
+ }
}
tr.metrics.MetricRegistry.register(powerMetric);

Powered by Google App Engine
This is Rietveld 408576698