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

Unified Diff: tools/bench_pictures_main.cpp

Issue 19862002: Do timer allocation and string building outside of bench loops (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: on top of tot Created 7 years, 5 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 | « tools/bbh_shootout.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bench_pictures_main.cpp
diff --git a/tools/bench_pictures_main.cpp b/tools/bench_pictures_main.cpp
index eea9644cf14658ceecf035406c53897aff012239..cd4b735d5e56943ead8fa8b215a8d337814deb4e 100644
--- a/tools/bench_pictures_main.cpp
+++ b/tools/bench_pictures_main.cpp
@@ -349,8 +349,13 @@ static void setup_benchmark(sk_tools::PictureBenchmark* benchmark) {
}
renderer->setDrawFilters(drawFilters, filtersName(drawFilters));
- benchmark->setPrintMin(FLAGS_min);
- benchmark->setLogPerIter(FLAGS_logPerIter);
+ if (FLAGS_logPerIter) {
+ benchmark->setTimerResultType(TimerData::kPerIter_Result);
+ } else if (FLAGS_min) {
+ benchmark->setTimerResultType(TimerData::kMin_Result);
+ } else {
+ benchmark->setTimerResultType(TimerData::kAvg_Result);
+ }
benchmark->setRenderer(renderer);
benchmark->setRepeats(FLAGS_repeat);
benchmark->setLogger(&gLogger);
« no previous file with comments | « tools/bbh_shootout.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698