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

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

Issue 2293533002: Refactor NumericBuilder to HistogramBinBoundaries. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: rebase 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 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/category_util.html"> 8 <link rel="import" href="/tracing/base/category_util.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/metrics/metric_registry.html"> 10 <link rel="import" href="/tracing/metrics/metric_registry.html">
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 for (var ev of list) { 115 for (var ev of list) {
116 if (ev.start < ts) 116 if (ev.start < ts)
117 continue; 117 continue;
118 if (eventAfterTimestamp === undefined) 118 if (eventAfterTimestamp === undefined)
119 eventAfterTimestamp = ev; 119 eventAfterTimestamp = ev;
120 } 120 }
121 return eventAfterTimestamp; 121 return eventAfterTimestamp;
122 } 122 }
123 }; 123 };
124 124
125 var FIRST_PAINT_NUMERIC_BUILDER = 125 var FIRST_PAINT_BOUNDARIES = tr.v.HistogramBinBoundaries
126 new tr.v.NumericBuilder(timeDurationInMs_smallerIsBetter, 0) 126 .createLinear(0, 1e3, 20) // 50ms step to 1s
127 .addLinearBins(1000, 20) // 50ms step to 1s 127 .addLinearBins(3e3, 20) // 100ms step to 3s
128 .addLinearBins(3000, 20) // 100ms step to 3s 128 .addExponentialBins(20e3, 20);
129 .addExponentialBins(20000, 20); 129
130 function createHistogram() { 130 function createHistogram() {
131 var histogram = FIRST_PAINT_NUMERIC_BUILDER.build(); 131 var histogram = new tr.v.Histogram(
132 timeDurationInMs_smallerIsBetter, FIRST_PAINT_BOUNDARIES);
132 histogram.customizeSummaryOptions({ 133 histogram.customizeSummaryOptions({
133 avg: true, 134 avg: true,
134 count: false, 135 count: false,
135 max: true, 136 max: true,
136 min: true, 137 min: true,
137 std: true, 138 std: true,
138 sum: false, 139 sum: false,
139 percentile: [0.90, 0.95, 0.99], 140 percentile: [0.90, 0.95, 0.99],
140 }); 141 });
141 return histogram; 142 return histogram;
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 timeToFirstMeaningfulPaintAndTimeToInteractiveMetrics(values, model); 496 timeToFirstMeaningfulPaintAndTimeToInteractiveMetrics(values, model);
496 } 497 }
497 498
498 tr.metrics.MetricRegistry.register(loadingMetric); 499 tr.metrics.MetricRegistry.register(loadingMetric);
499 500
500 return { 501 return {
501 loadingMetric: loadingMetric 502 loadingMetric: loadingMetric
502 }; 503 };
503 }); 504 });
504 </script> 505 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/system_health/hazard_metric.html ('k') | tracing/tracing/metrics/system_health/long_tasks_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698