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

Side by Side Diff: bench/nanobench.cpp

Issue 1606323002: Make nanobench --outResultsFile only work with Release builds. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typo 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include <ctype.h> 8 #include <ctype.h>
9 9
10 #include "nanobench.h" 10 #include "nanobench.h"
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 if (!FLAGS_writePath.isEmpty()) { 1047 if (!FLAGS_writePath.isEmpty()) {
1048 SkDebugf("Writing files to %s.\n", FLAGS_writePath[0]); 1048 SkDebugf("Writing files to %s.\n", FLAGS_writePath[0]);
1049 if (!sk_mkdir(FLAGS_writePath[0])) { 1049 if (!sk_mkdir(FLAGS_writePath[0])) {
1050 SkDebugf("Could not create %s. Files won't be written.\n", FLAGS_wri tePath[0]); 1050 SkDebugf("Could not create %s. Files won't be written.\n", FLAGS_wri tePath[0]);
1051 FLAGS_writePath.set(0, nullptr); 1051 FLAGS_writePath.set(0, nullptr);
1052 } 1052 }
1053 } 1053 }
1054 1054
1055 SkAutoTDelete<ResultsWriter> log(new ResultsWriter); 1055 SkAutoTDelete<ResultsWriter> log(new ResultsWriter);
1056 if (!FLAGS_outResultsFile.isEmpty()) { 1056 if (!FLAGS_outResultsFile.isEmpty()) {
1057 #if defined(SK_RELEASE)
1057 log.reset(new NanoJSONResultsWriter(FLAGS_outResultsFile[0])); 1058 log.reset(new NanoJSONResultsWriter(FLAGS_outResultsFile[0]));
1059 #else
1060 SkDebugf("I'm ignoring --outResultsFile because this is a Debug build.") ;
1061 return 1;
1062 #endif
1058 } 1063 }
1059 1064
1060 if (1 == FLAGS_properties.count() % 2) { 1065 if (1 == FLAGS_properties.count() % 2) {
1061 SkDebugf("ERROR: --properties must be passed with an even number of argu ments.\n"); 1066 SkDebugf("ERROR: --properties must be passed with an even number of argu ments.\n");
1062 return 1; 1067 return 1;
1063 } 1068 }
1064 for (int i = 1; i < FLAGS_properties.count(); i += 2) { 1069 for (int i = 1; i < FLAGS_properties.count(); i += 2) {
1065 log->property(FLAGS_properties[i-1], FLAGS_properties[i]); 1070 log->property(FLAGS_properties[i-1], FLAGS_properties[i]);
1066 } 1071 }
1067 1072
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 1258
1254 return 0; 1259 return 0;
1255 } 1260 }
1256 1261
1257 #if !defined SK_BUILD_FOR_IOS 1262 #if !defined SK_BUILD_FOR_IOS
1258 int main(int argc, char** argv) { 1263 int main(int argc, char** argv) {
1259 SkCommandLineFlags::Parse(argc, argv); 1264 SkCommandLineFlags::Parse(argc, argv);
1260 return nanobench_main(); 1265 return nanobench_main();
1261 } 1266 }
1262 #endif 1267 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698