| 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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 cleanup_run(target); | 1193 cleanup_run(target); |
| 1194 continue; | 1194 continue; |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 Stats stats(samples); | 1197 Stats stats(samples); |
| 1198 log->config(config); | 1198 log->config(config); |
| 1199 log->configOption("name", bench->getName()); | 1199 log->configOption("name", bench->getName()); |
| 1200 benchStream.fillCurrentOptions(log.get()); | 1200 benchStream.fillCurrentOptions(log.get()); |
| 1201 target->fillOptions(log.get()); | 1201 target->fillOptions(log.get()); |
| 1202 log->metric("min_ms", stats.min); | 1202 log->metric("min_ms", stats.min); |
| 1203 log->metric("median_ms", stats.median); | |
| 1204 #if SK_SUPPORT_GPU | 1203 #if SK_SUPPORT_GPU |
| 1205 if (gpuStatsDump) { | 1204 if (gpuStatsDump) { |
| 1206 // dump to json, only SKPBench currently returns valid keys / va
lues | 1205 // dump to json, only SKPBench currently returns valid keys / va
lues |
| 1207 SkASSERT(keys.count() == values.count()); | 1206 SkASSERT(keys.count() == values.count()); |
| 1208 for (int i = 0; i < keys.count(); i++) { | 1207 for (int i = 0; i < keys.count(); i++) { |
| 1209 log->metric(keys[i].c_str(), values[i]); | 1208 log->metric(keys[i].c_str(), values[i]); |
| 1210 } | 1209 } |
| 1211 } | 1210 } |
| 1212 #endif | 1211 #endif |
| 1213 | 1212 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 | 1280 |
| 1282 return 0; | 1281 return 0; |
| 1283 } | 1282 } |
| 1284 | 1283 |
| 1285 #if !defined SK_BUILD_FOR_IOS | 1284 #if !defined SK_BUILD_FOR_IOS |
| 1286 int main(int argc, char** argv) { | 1285 int main(int argc, char** argv) { |
| 1287 SkCommandLineFlags::Parse(argc, argv); | 1286 SkCommandLineFlags::Parse(argc, argv); |
| 1288 return nanobench_main(); | 1287 return nanobench_main(); |
| 1289 } | 1288 } |
| 1290 #endif | 1289 #endif |
| OLD | NEW |