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

Unified Diff: bench/nanobench.cpp

Issue 1115203002: DM+nanobench: print both current and max RSS. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | dm/DM.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index c33f2c77d2624d6e59a0a2e14848fd35d1b5ad52..85685fb3bccd52febb98fef804a86e2307f581cf 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -137,7 +137,7 @@ struct GPUTarget : public Target {
void fence() override {
SK_GL(*this->gl, Finish());
}
-
+
bool needsFrameTiming() const override { return true; }
bool init(SkImageInfo info, Benchmark* bench) override {
uint32_t flags = this->config.useDFText ? SkSurfaceProps::kUseDistanceFieldFonts_Flag : 0;
@@ -166,7 +166,7 @@ struct GPUTarget : public Target {
log->configOption("GL_SHADING_LANGUAGE_VERSION", (const char*) version);
}
};
-
+
#endif
static double time(int loops, Benchmark* bench, Target* target) {
@@ -899,7 +899,7 @@ int nanobench_main() {
} else if (FLAGS_quiet) {
SkDebugf("median\tbench\tconfig\n");
} else {
- SkDebugf("maxrss\tloops\tmin\tmedian\tmean\tmax\tstddev\t%-*s\tconfig\tbench\n",
+ SkDebugf("curr/maxrss\tloops\tmin\tmedian\tmean\tmax\tstddev\t%-*s\tconfig\tbench\n",
FLAGS_samples, "samples");
}
@@ -963,8 +963,9 @@ int nanobench_main() {
if (targets.count() == 1) {
config = ""; // Only print the config if we run the same bench on more than one.
}
- SkDebugf("%4dM\t%s\t%s\n"
- , sk_tools::getBestResidentSetSizeMB()
+ SkDebugf("%4d/%-4dMB\t%s\t%s\n"
+ , sk_tools::getCurrResidentSetSizeMB()
+ , sk_tools::getMaxResidentSetSizeMB()
, bench->getUniqueName()
, config);
} else if (FLAGS_verbose) {
@@ -979,8 +980,9 @@ int nanobench_main() {
SkDebugf("%s\t%s\t%s\n", HUMANIZE(stats.median), bench->getUniqueName(), config);
} else {
const double stddev_percent = 100 * sqrt(stats.var) / stats.mean;
- SkDebugf("%4dM\t%d\t%s\t%s\t%s\t%s\t%.0f%%\t%s\t%s\t%s\n"
- , sk_tools::getBestResidentSetSizeMB()
+ SkDebugf("%4d/%-4dMB\t%d\t%s\t%s\t%s\t%s\t%.0f%%\t%s\t%s\t%s\n"
+ , sk_tools::getCurrResidentSetSizeMB()
+ , sk_tools::getMaxResidentSetSizeMB()
, loops
, HUMANIZE(stats.min)
, HUMANIZE(stats.median)
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698