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/iteration_helpers.html"> | 8 <link rel="import" href="/tracing/base/iteration_helpers.html"> |
9 <link rel="import" href="/tracing/base/range.html"> | 9 <link rel="import" href="/tracing/base/math/range.html"> |
10 <link rel="import" href="/tracing/core/test_utils.html"> | 10 <link rel="import" href="/tracing/core/test_utils.html"> |
11 <link rel="import" href="/tracing/metrics/system_health/memory_metric.html"> | 11 <link rel="import" href="/tracing/metrics/system_health/memory_metric.html"> |
12 <link rel="import" href="/tracing/model/container_memory_dump.html"> | 12 <link rel="import" href="/tracing/model/container_memory_dump.html"> |
13 <link rel="import" href="/tracing/model/heap_dump.html"> | 13 <link rel="import" href="/tracing/model/heap_dump.html"> |
14 <link rel="import" href="/tracing/model/memory_dump_test_utils.html"> | 14 <link rel="import" href="/tracing/model/memory_dump_test_utils.html"> |
15 <link rel="import" href="/tracing/model/vm_region.html"> | 15 <link rel="import" href="/tracing/model/vm_region.html"> |
16 <link rel="import" href="/tracing/value/histogram_set.html"> | 16 <link rel="import" href="/tracing/value/histogram_set.html"> |
17 | 17 |
18 <script> | 18 <script> |
19 'use strict'; | 19 'use strict'; |
(...skipping 3264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3284 addProcessMemoryDump(addGlobalMemoryDump( | 3284 addProcessMemoryDump(addGlobalMemoryDump( |
3285 model, {ts: 19, duration: 2, levelOfDetail: DETAILED}), pWebView); | 3285 model, {ts: 19, duration: 2, levelOfDetail: DETAILED}), pWebView); |
3286 addProcessMemoryDump(addGlobalMemoryDump( | 3286 addProcessMemoryDump(addGlobalMemoryDump( |
3287 model, {ts: 21, duration: 5, levelOfDetail: LIGHT}), pWebView); | 3287 model, {ts: 21, duration: 5, levelOfDetail: LIGHT}), pWebView); |
3288 | 3288 |
3289 // Unknown browser: only the LIGHT dump should be kept. | 3289 // Unknown browser: only the LIGHT dump should be kept. |
3290 addGlobalMemoryDump(model, {ts: 5, duration: 3, levelOfDetail: DETAILED}); | 3290 addGlobalMemoryDump(model, {ts: 5, duration: 3, levelOfDetail: DETAILED}); |
3291 addGlobalMemoryDump(model, {ts: 9, duration: 12, levelOfDetail: LIGHT}); | 3291 addGlobalMemoryDump(model, {ts: 9, duration: 12, levelOfDetail: LIGHT}); |
3292 addGlobalMemoryDump(model, {ts: 22, duration: 3, levelOfDetail: DETAILED}); | 3292 addGlobalMemoryDump(model, {ts: 22, duration: 3, levelOfDetail: DETAILED}); |
3293 }, { /* opt_options */ | 3293 }, { /* opt_options */ |
3294 rangeOfInterest: tr.b.Range.fromExplicitRange(10, 20) | 3294 rangeOfInterest: tr.b.math.Range.fromExplicitRange(10, 20) |
3295 }, { | 3295 }, { |
3296 'memory:chrome:all_processes:dump_count': { | 3296 'memory:chrome:all_processes:dump_count': { |
3297 value: [3], | 3297 value: [3], |
3298 unit: count_smallerIsBetter, | 3298 unit: count_smallerIsBetter, |
3299 description: 'total number of all memory dumps added by Chrome to the ' + | 3299 description: 'total number of all memory dumps added by Chrome to the ' + |
3300 'trace' | 3300 'trace' |
3301 }, | 3301 }, |
3302 'memory:chrome:all_processes:dump_count:detailed': { | 3302 'memory:chrome:all_processes:dump_count:detailed': { |
3303 value: [0], | 3303 value: [0], |
3304 unit: count_smallerIsBetter, | 3304 unit: count_smallerIsBetter, |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3627 addProcessMemoryDump(gmd, pChrome, {ts: 11}); | 3627 addProcessMemoryDump(gmd, pChrome, {ts: 11}); |
3628 }); | 3628 }); |
3629 var histograms = new tr.v.HistogramSet(); | 3629 var histograms = new tr.v.HistogramSet(); |
3630 | 3630 |
3631 assert.throws(function() { | 3631 assert.throws(function() { |
3632 tr.metrics.sh.memoryMetric(histograms, model); | 3632 tr.metrics.sh.memoryMetric(histograms, model); |
3633 }, 'Memory dump ID clash across multiple browsers with PIDs: 1 and 2'); | 3633 }, 'Memory dump ID clash across multiple browsers with PIDs: 1 and 2'); |
3634 }); | 3634 }); |
3635 }); | 3635 }); |
3636 </script> | 3636 </script> |
OLD | NEW |