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

Unified Diff: dm/DM.cpp

Issue 1612483002: Add pre_log option to nanobench; make this option default true in nanobench and dm. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Make pre_log default to false; set in dm_flags.py and nanobench_flags.py instead. Created 4 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
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 12ce23c6a1ef67864fa4304a93943939fa651285..06a8fbff6cc49313a3eedc343fe2585a0f3b357e 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -64,7 +64,6 @@ DEFINE_string(uninterestingHashesFile, "",
DEFINE_int32(shards, 1, "We're splitting source data into this many shards.");
DEFINE_int32(shard, 0, "Which shard do I run?");
-DEFINE_bool2(pre_log, p, false, "Log before running each test. May be incomprehensible when threading");
__SK_FORCE_IMAGE_DECODER_LINKING;
using namespace DM;
@@ -847,7 +846,10 @@ struct Task {
SkBitmap bitmap;
SkDynamicMemoryWStream stream;
if (FLAGS_pre_log) {
- SkDebugf("\nRunning %s->%s", name.c_str(), task->sink.tag.c_str());
+ SkDebugf("%sRunning %s->%s",
+ FLAGS_verbose ? "\n" : "\t",
+ name.c_str(),
+ task->sink.tag.c_str());
}
start(task->sink.tag.c_str(), task->src.tag, task->src.options, name.c_str());
Error err = task->sink->draw(*task->src, &bitmap, &stream, &log);
@@ -1056,7 +1058,9 @@ static void run_test(skiatest::Test* test) {
start("unit", "test", "", test->name);
GrContextFactory factory;
if (FLAGS_pre_log) {
- SkDebugf("\nRunning test %s", test->name);
+ SkDebugf("%sRunning test %s",
+ FLAGS_verbose ? "\n" : "\t",
+ test->name);
}
test->proc(&reporter, &factory);
}
@@ -1122,6 +1126,10 @@ int dm_main() {
SkTaskGroup::Enabler enabled(FLAGS_threads);
gCreateTypefaceDelegate = &create_from_name;
+ if (FLAGS_verbose) {
+ FLAGS_pre_log = true;
mtklein 2016/01/25 19:44:35 ? Let's let people set independent things indepen
dogben 2016/01/25 20:18:00 Done.
+ }
+
start_keepalive();
gather_gold();
« bench/nanobench.cpp ('K') | « bench/nanobench.cpp ('k') | tools/dm_flags.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698