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;
log->configOption("GL_SHADING_LANGUAGE_VERSION", (const char*) version);
}
};
-
+
#endif
static double time(int loops, Benchmark* bench, Target* target) {
} 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");
}
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) {
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)
log.prepend("\n");
}
auto pending = sk_atomic_dec(&gPending)-1;
- SkDebugf("%s(%4dMB %5d) %s\t%s%s%s", FLAGS_verbose ? "\n" : kSkOverwriteLine
- , sk_tools::getBestResidentSetSizeMB()
+ SkDebugf("%s(%4d/%-4dMB %5d) %s\t%s%s%s", FLAGS_verbose ? "\n" : kSkOverwriteLine
+ , sk_tools::getCurrResidentSetSizeMB()
+ , sk_tools::getMaxResidentSetSizeMB()
, pending
, HumanizeMs(ms).c_str()
, id.c_str()
*/
int getCurrResidentSetSizeMB();
-/**
- * If implemented, returns getCurrResidentSetSizeMB().
- * If not, if implemented, returns getMaxResidentSetSizeMB().
- * If not, returns -1.
- */
-inline int getBestResidentSetSizeMB() {
- int mb = getCurrResidentSetSizeMB();
- return mb >= 0 ? mb : getMaxResidentSetSizeMB();
-}
-
} // namespace sk_tools
#endif // ProcStats_DEFINED