| Index: tracing/tracing/metrics/system_health/rail_power_metric.html
|
| diff --git a/tracing/tracing/metrics/system_health/rail_power_metric.html b/tracing/tracing/metrics/system_health/rail_power_metric.html
|
| deleted file mode 100644
|
| index 7c561344a82430e3f3f456d63afc445463845702..0000000000000000000000000000000000000000
|
| --- a/tracing/tracing/metrics/system_health/rail_power_metric.html
|
| +++ /dev/null
|
| @@ -1,94 +0,0 @@
|
| -<!DOCTYPE html>
|
| -<!--
|
| -Copyright 2016 The Chromium Authors. All rights reserved.
|
| -Use of this source code is governed by a BSD-style license that can be
|
| -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/metrics/system_health/clock_sync_latency_metric.html">
|
| -<link rel="import" href="/tracing/value/histogram.html">
|
| -
|
| -<script>
|
| -'use strict';
|
| -
|
| -tr.exportTo('tr.metrics.sh', function() {
|
| - function railPowerMetric(values, model) {
|
| - if (!model.device.powerSeries)
|
| - return;
|
| - var railStageToTimeHist = new Map();
|
| - var railStageToEnergyHist = new Map();
|
| - var railStageToPowerHist = new Map();
|
| -
|
| - for (var exp of model.userModel.expectations) {
|
| - var currTitle = exp.title.toLowerCase().replace(' ', '_');
|
| - if (!railStageToTimeHist.has(currTitle)) {
|
| - var timeHist = new tr.v.Histogram('time:' + currTitle,
|
| - tr.b.Unit.byName.timeDurationInMs_smallerIsBetter);
|
| - timeHist.description = 'Time spent in RAIL stage ' + currTitle;
|
| -
|
| - var energyHist = new tr.v.Histogram('energy:' + currTitle,
|
| - tr.b.Unit.byName.energyInJoules_smallerIsBetter);
|
| - energyHist.description = 'Energy consumed by RAIL stage ' + currTitle;
|
| -
|
| - var powerHist = new tr.v.Histogram('power:' + currTitle,
|
| - tr.b.Unit.byName.powerInWatts_smallerIsBetter);
|
| - powerHist.description =
|
| - 'Energy consumption rate by RAIL stage ' + currTitle;
|
| -
|
| - timeHist.customizeSummaryOptions({
|
| - avg: false,
|
| - count: false,
|
| - max: true,
|
| - min: true,
|
| - std: false,
|
| - sum: true,
|
| - });
|
| -
|
| - energyHist.customizeSummaryOptions({
|
| - avg: false,
|
| - count: false,
|
| - max: true,
|
| - min: true,
|
| - std: false,
|
| - sum: true,
|
| - });
|
| -
|
| - powerHist.customizeSummaryOptions({
|
| - avg: true,
|
| - count: false,
|
| - max: true,
|
| - min: true,
|
| - std: false,
|
| - sum: false,
|
| - });
|
| -
|
| - railStageToTimeHist.set(currTitle, timeHist);
|
| - railStageToEnergyHist.set(currTitle, energyHist);
|
| - railStageToPowerHist.set(currTitle, powerHist);
|
| -
|
| - values.addHistogram(timeHist);
|
| - values.addHistogram(energyHist);
|
| - values.addHistogram(powerHist);
|
| - }
|
| - var durationInMs = exp.duration;
|
| - var durationInS = tr.b.convertUnit(durationInMs,
|
| - tr.b.UnitScale.Metric.MILLI, tr.b.UnitScale.Metric.NONE);
|
| - var energyInJ = model.device.powerSeries.getEnergyConsumedInJ(
|
| - exp.start, exp.end);
|
| - var powerInW = energyInJ / durationInS;
|
| -
|
| - railStageToTimeHist.get(currTitle).addSample(durationInMs);
|
| - railStageToEnergyHist.get(currTitle).addSample(energyInJ);
|
| - railStageToPowerHist.get(currTitle).addSample(powerInW);
|
| - }
|
| - }
|
| -
|
| - tr.metrics.MetricRegistry.register(railPowerMetric);
|
| -
|
| - return {
|
| - railPowerMetric: railPowerMetric
|
| - };
|
| -});
|
| -</script>
|
|
|