DM: JSON output adds process_max_resident_set_size_MB
authorhalcanary <halcanary@google.com>
Wed, 1 Apr 2015 20:31:34 +0000 (13:31 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 1 Apr 2015 20:31:34 +0000 (13:31 -0700)
Review URL: https://codereview.chromium.org/917943002

dm/DMJsonWriter.cpp

index e4a3d12..c017dde 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "DMJsonWriter.h"
 
+#include "ProcStats.h"
 #include "SkCommonFlags.h"
 #include "SkData.h"
 #include "SkJSONCPP.h"
@@ -74,6 +75,11 @@ void JsonWriter::DumpJson() {
         }
     }
 
+    int maxResidentSetSizeMB = sk_tools::getMaxResidentSetSizeMB();
+    if (maxResidentSetSizeMB != -1) {
+        root["max_rss_MB"] = sk_tools::getMaxResidentSetSizeMB();
+    }
+
     SkString path = SkOSPath::Join(FLAGS_writePath[0], "dm.json");
     sk_mkdir(FLAGS_writePath[0]);
     SkFILEWStream stream(path.c_str());