aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-08-19 15:55:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-19 15:55:55 -0700
commitafb4379dbca4d4d3824ace183a7348d24bc1589f (patch)
tree8eb8aeb9bd612669796e5c51afc35cdb46308f36 /bench
parentd2a3522503ca0c39829f1bb41f01201d1affdaf6 (diff)
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
Diffstat (limited to 'bench')
-rw-r--r--bench/nanobench.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index a1fea22a85..507507bd0a 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 @@ int nanobench_main() {
} 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 @@ int nanobench_main() {
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)