From 5352015fa318fc6c25b789cb0a81d2d586d6121f Mon Sep 17 00:00:00 2001 From: mtklein Date: Wed, 20 Jan 2016 09:53:59 -0800 Subject: [PATCH] Make nanobench --outResultsFile only work with Release builds. It is very, very misleading to report performance numbers for Debug builds. This makes it impossible for us to upload them to perf.skia.org. BUG=skia:4828 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1606323002 Review URL: https://codereview.chromium.org/1606323002 --- bench/nanobench.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 7efd858c5c..0a8e7355a2 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -1054,7 +1054,12 @@ int nanobench_main() { SkAutoTDelete log(new ResultsWriter); if (!FLAGS_outResultsFile.isEmpty()) { +#if defined(SK_RELEASE) log.reset(new NanoJSONResultsWriter(FLAGS_outResultsFile[0])); +#else + SkDebugf("I'm ignoring --outResultsFile because this is a Debug build."); + return 1; +#endif } if (1 == FLAGS_properties.count() % 2) {