diff --git a/base/benchmark.hpp b/base/benchmark.hpp index dc3faa06..c02bc867 100644 --- a/base/benchmark.hpp +++ b/base/benchmark.hpp @@ -26,8 +26,6 @@ namespace vks Benchmark() { active = true; - iterationTimes.resize(iterations); - #if defined(_WIN32) AttachConsole(ATTACH_PARENT_PROCESS); FILE *stream; @@ -37,7 +35,7 @@ namespace vks } void run(std::function renderFunc) { - static uint32_t currIteration; + iterationTimes.resize(iterations); for (uint32_t i = 0; i < iterations; i++) { for (uint32_t f = 0; f < framesPerIteration; f++) { auto tStart = std::chrono::high_resolution_clock::now(); diff --git a/bin/benchmark-all.py b/bin/benchmark-all.py index aebfc315..403feabb 100644 --- a/bin/benchmark-all.py +++ b/bin/benchmark-all.py @@ -72,9 +72,9 @@ os.makedirs("./benchmark", exist_ok=True) for example in EXAMPLES: print("---- (%d/%d) Running %s in benchmark mode ----" % (CURR_INDEX+1, len(EXAMPLES), example)) if platform.system() == 'Linux': - RESULT_CODE = subprocess.call("./%s %s ./benchmark/%s" % (example, ARGS, example), shell=True) + RESULT_CODE = subprocess.call("./%s %s ./benchmark/%s 5" % (example, ARGS, example), shell=True) else: - RESULT_CODE = subprocess.call("%s %s ./benchmark/%s" % (example, ARGS, example)) + RESULT_CODE = subprocess.call("%s %s ./benchmark/%s 5" % (example, ARGS, example)) if RESULT_CODE == 0: print("Results written to ./benchmark/%s.csv" % example) else: