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

Side by Side Diff: tracing/tracing/metrics/system_health/power_metric.html

Issue 2656493002: Register metric Histogram names. (Closed)
Patch Set: rebase Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/range.html"> 8 <link rel="import" href="/tracing/base/range.html">
9 <link rel="import" href="/tracing/base/statistics.html"> 9 <link rel="import" href="/tracing/base/statistics.html">
10 <link rel="import" href="/tracing/base/unit_scale.html"> 10 <link rel="import" href="/tracing/base/unit_scale.html">
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 */ 359 */
360 function powerMetric(values, model) { 360 function powerMetric(values, model) {
361 var data = { 361 var data = {
362 model: model, 362 model: model,
363 histograms: {} 363 histograms: {}
364 }; 364 };
365 for (var interval of computeTimeIntervals_(model)) 365 for (var interval of computeTimeIntervals_(model))
366 createHistograms_(data, interval, values); 366 createHistograms_(data, interval, values);
367 } 367 }
368 368
369 tr.metrics.MetricRegistry.register(powerMetric); 369 tr.metrics.MetricRegistry.register(powerMetric, {
370 histogramNames: new Set([]),
371 });
370 372
371 return { 373 return {
372 powerMetric 374 powerMetric
373 }; 375 };
374 }); 376 });
375 </script> 377 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698