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

Side by Side Diff: bench/nanobench.cpp

Issue 452633002: Fix iOS build by centralizing --writePath. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | dm/DMWriteTask.cpp » ('j') | 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 "Benchmark.h" 10 #include "Benchmark.h"
(...skipping 15 matching lines...) Expand all
26 #if SK_SUPPORT_GPU 26 #if SK_SUPPORT_GPU
27 #include "gl/GrGLDefines.h" 27 #include "gl/GrGLDefines.h"
28 #include "GrContextFactory.h" 28 #include "GrContextFactory.h"
29 GrContextFactory gGrFactory; 29 GrContextFactory gGrFactory;
30 #endif 30 #endif
31 31
32 __SK_FORCE_IMAGE_DECODER_LINKING; 32 __SK_FORCE_IMAGE_DECODER_LINKING;
33 33
34 static const int kAutoTuneLoops = -1; 34 static const int kAutoTuneLoops = -1;
35 35
36 static const int kDefaultLoops = 36 static const int kDefaultLoops =
37 #ifdef SK_DEBUG 37 #ifdef SK_DEBUG
38 1; 38 1;
39 #else 39 #else
40 kAutoTuneLoops; 40 kAutoTuneLoops;
41 #endif 41 #endif
42 42
43 static SkString loops_help_txt() { 43 static SkString loops_help_txt() {
44 SkString help; 44 SkString help;
45 help.printf("Number of times to run each bench. Set this to %d to auto-" 45 help.printf("Number of times to run each bench. Set this to %d to auto-"
46 "tune for each bench. Timings are only reported when auto-tuning .", 46 "tune for each bench. Timings are only reported when auto-tuning .",
47 kAutoTuneLoops); 47 kAutoTuneLoops);
48 return help; 48 return help;
49 } 49 }
50 50
51 DEFINE_int32(loops, kDefaultLoops, loops_help_txt().c_str()); 51 DEFINE_int32(loops, kDefaultLoops, loops_help_txt().c_str());
52 52
53 DEFINE_string2(writePath, w, "", "If set, write benches here as .pngs.");
54
55 DEFINE_int32(samples, 10, "Number of samples to measure for each bench."); 53 DEFINE_int32(samples, 10, "Number of samples to measure for each bench.");
56 DEFINE_int32(overheadLoops, 100000, "Loops to estimate timer overhead."); 54 DEFINE_int32(overheadLoops, 100000, "Loops to estimate timer overhead.");
57 DEFINE_double(overheadGoal, 0.0001, 55 DEFINE_double(overheadGoal, 0.0001,
58 "Loop until timer overhead is at most this fraction of our measurm ents."); 56 "Loop until timer overhead is at most this fraction of our measurm ents.");
59 DEFINE_double(gpuMs, 5, "Target bench time in millseconds for GPU."); 57 DEFINE_double(gpuMs, 5, "Target bench time in millseconds for GPU.");
60 DEFINE_int32(gpuFrameLag, 5, "Overestimate of maximum number of frames GPU allow s to lag."); 58 DEFINE_int32(gpuFrameLag, 5, "Overestimate of maximum number of frames GPU allow s to lag.");
61 59
62 DEFINE_string(outResultsFile, "", "If given, write results here as JSON."); 60 DEFINE_string(outResultsFile, "", "If given, write results here as JSON.");
63 DEFINE_int32(maxCalibrationAttempts, 3, 61 DEFINE_int32(maxCalibrationAttempts, 3,
64 "Try up to this many times to guess loops for a bench, or skip the bench."); 62 "Try up to this many times to guess loops for a bench, or skip the bench.");
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 681
684 return 0; 682 return 0;
685 } 683 }
686 684
687 #if !defined SK_BUILD_FOR_IOS 685 #if !defined SK_BUILD_FOR_IOS
688 int main(int argc, char** argv) { 686 int main(int argc, char** argv) {
689 SkCommandLineFlags::Parse(argc, argv); 687 SkCommandLineFlags::Parse(argc, argv);
690 return nanobench_main(); 688 return nanobench_main();
691 } 689 }
692 #endif 690 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DMWriteTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698