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

Unified Diff: bench/nanobench.cpp

Issue 891973002: Add texture create/upload stats and make nanobench have explicit gpu stats flag (Closed) Base URL: https://skia.googlesource.com/skia.git@lala
Patch Set: rebase Created 5 years, 11 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 | src/gpu/GrGpu.h » ('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 8d00ca132f7da475c65140f6715bcf3d53ba18f8..eb48ec228d6b35886d6c8a87cd5e1c344f9479e3 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -75,6 +75,7 @@ DEFINE_bool(bbh, true, "Build a BBH for SKPs?");
DEFINE_bool(mpd, true, "Use MultiPictureDraw for the SKPs?");
DEFINE_int32(flushEvery, 10, "Flush --outResultsFile every Nth run.");
DEFINE_bool(resetGpuContext, true, "Reset the GrContext before running each test.");
+DEFINE_bool(gpuStats, false, "Print GPU stats after each gpu benchmark?");
static SkString humanize(double ms) {
if (FLAGS_verbose) return SkStringPrintf("%llu", (uint64_t)(ms*1e6));
@@ -766,10 +767,11 @@ int nanobench_main() {
, bench->getUniqueName()
);
}
-#if SK_SUPPORT_GPU && GR_CACHE_STATS
- if (FLAGS_veryVerbose &&
+#if SK_SUPPORT_GPU
+ if (FLAGS_gpuStats &&
Benchmark::kGPU_Backend == targets[j]->config.backend) {
gGrFactory->get(targets[j]->config.ctxType)->printCacheStats();
+ gGrFactory->get(targets[j]->config.ctxType)->printGpuStats();
}
#endif
}
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698