Chromium Code Reviews| Index: tracing/tracing/model/memory_dump_test_utils.html |
| diff --git a/tracing/tracing/model/memory_dump_test_utils.html b/tracing/tracing/model/memory_dump_test_utils.html |
| index 55a499192bfdcb7bf4eb7921ad7eae76e9eced6f..aedb12099c5ec50cc8439e2cceea12ef75c25f30 100644 |
| --- a/tracing/tracing/model/memory_dump_test_utils.html |
| +++ b/tracing/tracing/model/memory_dump_test_utils.html |
| @@ -45,16 +45,21 @@ tr.exportTo('tr.model', function() { |
| MemoryDumpTestUtils.SIZE_DELTA = 0.0001; |
| MemoryDumpTestUtils.addGlobalMemoryDump = function( |
| - model, timestamp, opt_levelOfDetail) { |
| + model, timestamp, opt_levelOfDetail, opt_duration) { |
|
benjhayden
2016/07/07 17:31:32
Should this be refactored to take a dict of option
petrcermak
2016/07/08 12:14:55
I agree. Are you OK with me doing it in a subseque
|
| var gmd = new GlobalMemoryDump(model, timestamp); |
| gmd.levelOfDetail = opt_levelOfDetail === undefined ? |
| LIGHT : opt_levelOfDetail; |
| + if (opt_duration) |
| + gmd.duration = opt_duration; |
| model.globalMemoryDumps.push(gmd); |
| return gmd; |
| }; |
| - MemoryDumpTestUtils.addProcessMemoryDump = function(gmd, process, timestamp) { |
| - var pmd = new ProcessMemoryDump(gmd, process, timestamp); |
| + MemoryDumpTestUtils.addProcessMemoryDump = function( |
| + gmd, process, opt_timestamp) { |
| + if (opt_timestamp === undefined) |
| + opt_timestamp = gmd.start; |
| + var pmd = new ProcessMemoryDump(gmd, process, opt_timestamp); |
| process.memoryDumps.push(pmd); |
| if (process.pid in gmd.processMemoryDumps) { |
| // Test sanity check. |