From b3f0d566fd960e4cd9b68a6fb5f76520791d6699 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 11 Jan 2024 10:44:07 +0100 Subject: dd --- test/bench.hpp | 27 --------------------------- test/coords.cpp | 1 - 2 files changed, 28 deletions(-) delete mode 100644 test/bench.hpp diff --git a/test/bench.hpp b/test/bench.hpp deleted file mode 100644 index 7101e49f..00000000 --- a/test/bench.hpp +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once -#include -#include - -namespace floormat { - -template -requires requires (F& fun) { fun(); } -void bench_run(StringView name, F&& fun) -{ - using namespace std::chrono; - using clock = high_resolution_clock; -#if 0 - for (int i = 0; i < 20; i++) - fun(); - const auto t0 = clock::now(); - for (int i = 0; i < 1000; i++) - fun(); -#else - const auto t0 = clock::now(); - fun(); -#endif - const auto tm = clock::now() - t0; - Debug{} << "test" << name << "took" << duration_cast(tm).count() << "ms."; -} - -} // namespace floormat diff --git a/test/coords.cpp b/test/coords.cpp index 23d701c1..353b343a 100644 --- a/test/coords.cpp +++ b/test/coords.cpp @@ -1,6 +1,5 @@ #include "app.hpp" #include "src/object.hpp" -#include "bench.hpp" namespace floormat { -- cgit v1.2.3