| OLD | NEW |
| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 DEFINE_bool(gpuStatsDump, false, "Dump GPU states after each benchmark to json")
; | 120 DEFINE_bool(gpuStatsDump, false, "Dump GPU states after each benchmark to json")
; |
| 121 DEFINE_bool(keepAlive, false, "Print a message every so often so that we don't t
ime out"); | 121 DEFINE_bool(keepAlive, false, "Print a message every so often so that we don't t
ime out"); |
| 122 DEFINE_string(useThermalManager, "0,1,10,1000", "enabled,threshold,sleepTimeMs,T
imeoutMs for " | 122 DEFINE_string(useThermalManager, "0,1,10,1000", "enabled,threshold,sleepTimeMs,T
imeoutMs for " |
| 123 "thermalManager\n"); | 123 "thermalManager\n"); |
| 124 | 124 |
| 125 DEFINE_string(sourceType, "", | 125 DEFINE_string(sourceType, "", |
| 126 "Apply usual --match rules to source type: bench, gm, skp, image, etc.")
; | 126 "Apply usual --match rules to source type: bench, gm, skp, image, etc.")
; |
| 127 DEFINE_string(benchType, "", | 127 DEFINE_string(benchType, "", |
| 128 "Apply usual --match rules to bench type: micro, recording, playback, sk
codec, etc."); | 128 "Apply usual --match rules to bench type: micro, recording, playback, sk
codec, etc."); |
| 129 | 129 |
| 130 DEFINE_string(svgs, "", "Directory to read SVGs from, or a single SVG file."); | |
| 131 | |
| 132 static double now_ms() { return SkTime::GetNSecs() * 1e-6; } | 130 static double now_ms() { return SkTime::GetNSecs() * 1e-6; } |
| 133 | 131 |
| 134 static SkString humanize(double ms) { | 132 static SkString humanize(double ms) { |
| 135 if (FLAGS_verbose) return SkStringPrintf("%llu", (uint64_t)(ms*1e6)); | 133 if (FLAGS_verbose) return SkStringPrintf("%llu", (uint64_t)(ms*1e6)); |
| 136 return HumanizeMs(ms); | 134 return HumanizeMs(ms); |
| 137 } | 135 } |
| 138 #define HUMANIZE(ms) humanize(ms).c_str() | 136 #define HUMANIZE(ms) humanize(ms).c_str() |
| 139 | 137 |
| 140 bool Target::init(SkImageInfo info, Benchmark* bench) { | 138 bool Target::init(SkImageInfo info, Benchmark* bench) { |
| 141 if (Benchmark::kRaster_Backend == config.backend) { | 139 if (Benchmark::kRaster_Backend == config.backend) { |
| (...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 | 1332 |
| 1335 return 0; | 1333 return 0; |
| 1336 } | 1334 } |
| 1337 | 1335 |
| 1338 #if !defined SK_BUILD_FOR_IOS | 1336 #if !defined SK_BUILD_FOR_IOS |
| 1339 int main(int argc, char** argv) { | 1337 int main(int argc, char** argv) { |
| 1340 SkCommandLineFlags::Parse(argc, argv); | 1338 SkCommandLineFlags::Parse(argc, argv); |
| 1341 return nanobench_main(); | 1339 return nanobench_main(); |
| 1342 } | 1340 } |
| 1343 #endif | 1341 #endif |
| OLD | NEW |