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

Unified Diff: tracing/tracing/model/memory_dump_test_utils.html

Issue 2132683002: [memory-metric] Add support for time ranges to the TBMv2 memory metric (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Address comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/metrics/system_health/memory_metric_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
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.
« no previous file with comments | « tracing/tracing/metrics/system_health/memory_metric_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698