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

Side by Side Diff: bench/nanobench.cpp

Issue 1577963002: Have nanobench report bench median sample time too. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 cleanup_run(target); 1165 cleanup_run(target);
1166 continue; 1166 continue;
1167 } 1167 }
1168 1168
1169 Stats stats(samples); 1169 Stats stats(samples);
1170 log->config(config); 1170 log->config(config);
1171 log->configOption("name", bench->getName()); 1171 log->configOption("name", bench->getName());
1172 benchStream.fillCurrentOptions(log.get()); 1172 benchStream.fillCurrentOptions(log.get());
1173 target->fillOptions(log.get()); 1173 target->fillOptions(log.get());
1174 log->metric("min_ms", stats.min); 1174 log->metric("min_ms", stats.min);
1175 log->metric("median_ms", stats.median);
1175 #if SK_SUPPORT_GPU 1176 #if SK_SUPPORT_GPU
1176 if (gpuStatsDump) { 1177 if (gpuStatsDump) {
1177 // dump to json, only SKPBench currently returns valid keys / va lues 1178 // dump to json, only SKPBench currently returns valid keys / va lues
1178 SkASSERT(keys.count() == values.count()); 1179 SkASSERT(keys.count() == values.count());
1179 for (int i = 0; i < keys.count(); i++) { 1180 for (int i = 0; i < keys.count(); i++) {
1180 log->metric(keys[i].c_str(), values[i]); 1181 log->metric(keys[i].c_str(), values[i]);
1181 } 1182 }
1182 } 1183 }
1183 #endif 1184 #endif
1184 1185
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1253
1253 return 0; 1254 return 0;
1254 } 1255 }
1255 1256
1256 #if !defined SK_BUILD_FOR_IOS 1257 #if !defined SK_BUILD_FOR_IOS
1257 int main(int argc, char** argv) { 1258 int main(int argc, char** argv) {
1258 SkCommandLineFlags::Parse(argc, argv); 1259 SkCommandLineFlags::Parse(argc, argv);
1259 return nanobench_main(); 1260 return nanobench_main();
1260 } 1261 }
1261 #endif 1262 #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