aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/nanobench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bench/nanobench.cpp')
-rw-r--r--bench/nanobench.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 04583309ce..61de8a944e 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -1284,6 +1284,12 @@ int main(int argc, char** argv) {
? setup_gpu_bench(target, bench.get(), maxFrameLag)
: setup_cpu_bench(overhead, target, bench.get());
+ if (kFailedLoops == loops) {
+ // Can't be timed. A warning note has already been printed.
+ cleanup_run(target);
+ continue;
+ }
+
if (runs == 0 && FLAGS_ms < 1000) {
// Run the first bench for 1000ms to warm up the nanobench if FLAGS_ms < 1000.
// Otherwise, the first few benches' measurements will be inaccurate.
@@ -1326,12 +1332,6 @@ int main(int argc, char** argv) {
write_canvas_png(target, pngFilename);
}
- if (kFailedLoops == loops) {
- // Can't be timed. A warning note has already been printed.
- cleanup_run(target);
- continue;
- }
-
Stats stats(samples);
log->config(config);
log->configOption("name", bench->getName());