Print max RSS in GM and nanobench too.
Everyone used MB, so update the API to just return that.
BUG=skia:
R=halcanary@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/483323002
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index a1fea22..507507b 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -10,6 +10,7 @@
#include "Benchmark.h"
#include "CrashHandler.h"
#include "GMBench.h"
+#include "ProcStats.h"
#include "ResultsWriter.h"
#include "SKPBench.h"
#include "Stats.h"
@@ -590,7 +591,7 @@
} else if (FLAGS_quiet) {
SkDebugf("median\tbench\tconfig\n");
} else {
- SkDebugf("loops\tmin\tmedian\tmean\tmax\tstddev\tsamples\tconfig\tbench\n");
+ SkDebugf("maxrss\tloops\tmin\tmedian\tmean\tmax\tstddev\tsamples\tconfig\tbench\n");
}
SkTDArray<Config> configs;
@@ -673,7 +674,8 @@
SkDebugf("%s\t%s\t%s\n", HUMANIZE(stats.median), bench->getName(), config);
} else {
const double stddev_percent = 100 * sqrt(stats.var) / stats.mean;
- SkDebugf("%d\t%s\t%s\t%s\t%s\t%.0f%%\t%s\t%s\t%s\n"
+ SkDebugf("%4dM\t%d\t%s\t%s\t%s\t%s\t%.0f%%\t%s\t%s\t%s\n"
+ , sk_tools::getMaxResidentSetSizeMB()
, loops
, HUMANIZE(stats.min)
, HUMANIZE(stats.median)