From b42d0edb3b2a255fd5a9e0725cb4e32847cefea6 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Sat, 26 Aug 2017 20:17:34 +0200 Subject: [PATCH] Removed benchmark constructor --- base/benchmark.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/base/benchmark.hpp b/base/benchmark.hpp index c02bc867..9538ead7 100644 --- a/base/benchmark.hpp +++ b/base/benchmark.hpp @@ -24,7 +24,7 @@ namespace vks std::vector iterationTimes; std::string filename = "benchmarkresults.csv"; - Benchmark() { + void run(std::function renderFunc) { active = true; #if defined(_WIN32) AttachConsole(ATTACH_PARENT_PROCESS); @@ -32,9 +32,6 @@ namespace vks freopen_s(&stream, "CONOUT$", "w+", stdout); freopen_s(&stream, "CONOUT$", "w+", stderr); #endif - } - - void run(std::function renderFunc) { iterationTimes.resize(iterations); for (uint32_t i = 0; i < iterations; i++) { for (uint32_t f = 0; f < framesPerIteration; f++) { @@ -74,6 +71,7 @@ namespace vks std::cout << "best : " << (1000.0 / tMin) << " fps (" << tMin << " ms)" << std::endl; std::cout << "worst: " << (1000.0 / tMax) << " fps (" << tMax << " ms)" << std::endl; std::cout << "avg : " << (1000.0 / tAvg) << " fps (" << tAvg << " ms)" << std::endl; + std::cout << std::flush; } } };