Chromium Code Reviews| 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/core/test_utils.html"> | 8 <link rel="import" href="/tracing/core/test_utils.html"> |
| 9 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html"> | 9 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html"> |
| 10 <link rel="import" href="/tracing/metrics/tracing_metric.html"> | 10 <link rel="import" href="/tracing/metrics/tracing_metric.html"> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 checkDurationHistogram(histograms, | 154 checkDurationHistogram(histograms, |
| 155 'Average CPU overhead of mdp4 per OnMemoryDump call', 8); | 155 'Average CPU overhead of mdp4 per OnMemoryDump call', 8); |
| 156 checkDurationHistogram(histograms, | 156 checkDurationHistogram(histograms, |
| 157 'Average CPU overhead on non-memory-infra threads per memory-infra ' + | 157 'Average CPU overhead on non-memory-infra threads per memory-infra ' + |
| 158 'dump', | 158 'dump', |
| 159 47); | 159 47); |
| 160 checkDurationHistogram(histograms, | 160 checkDurationHistogram(histograms, |
| 161 'Average CPU overhead on all threads per memory-infra dump', 91); | 161 'Average CPU overhead on all threads per memory-infra dump', 91); |
| 162 }); | 162 }); |
| 163 | 163 |
| 164 test('traceImportDurationMetric', function() { | |
| 165 var model = new tr.Model(); | |
| 166 // We can't customize the model the normal way using | |
| 167 // test_utils.newModel(customizeModelCallback) because that callback is run | |
| 168 // before the end of the import phase, so our import duration will be | |
| 169 // overwritten. | |
| 170 model.stats.traceImportDurationMs = 10; | |
| 171 | |
| 172 var histograms = new tr.v.HistogramSet(); | |
| 173 tr.metrics.traceImportDurationMetric(histograms, model); | |
| 174 | |
| 175 assert.equal( | |
|
benjhayden
2017/02/17 16:48:55
strictEqual?
charliea (OOO until 10-5)
2017/02/17 20:26:04
Done.
| |
| 176 histograms.getHistogramNamed('trace_import_duration').average, 10); | |
| 177 }); | |
| 164 }); | 178 }); |
| 165 </script> | 179 </script> |
| OLD | NEW |