OLD | NEW |
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 Loading... |
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 Loading... |
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> |
OLD | NEW |