From f5245695cb5074bb09dcd1eb2c3cae47550054e8 Mon Sep 17 00:00:00 2001 From: Jay Vaughan Date: Wed, 18 Oct 2023 11:35:26 +0200 Subject: [PATCH] Delete benchmark.cpp - we're not ready for that yet and its failing gets in the way of testing the Github Actions --- benchmarks/Benchmarks.cpp | 40 --------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 benchmarks/Benchmarks.cpp diff --git a/benchmarks/Benchmarks.cpp b/benchmarks/Benchmarks.cpp deleted file mode 100644 index 17b9018..0000000 --- a/benchmarks/Benchmarks.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "PluginEditor.h" -#include "catch2/benchmark/catch_benchmark_all.hpp" -#include "catch2/catch_test_macros.hpp" - -TEST_CASE ("Boot performance") -{ - BENCHMARK_ADVANCED ("Processor constructor") - (Catch::Benchmark::Chronometer meter) - { - auto gui = juce::ScopedJuceInitialiser_GUI {}; - std::vector> storage (size_t (meter.runs())); - meter.measure ([&] (int i) { storage[(size_t) i].construct(); }); - }; - - BENCHMARK_ADVANCED ("Processor destructor") - (Catch::Benchmark::Chronometer meter) - { - auto gui = juce::ScopedJuceInitialiser_GUI {}; - std::vector> storage (size_t (meter.runs())); - for (auto& s : storage) - s.construct(); - meter.measure ([&] (int i) { storage[(size_t) i].destruct(); }); - }; - - BENCHMARK_ADVANCED ("Editor open and close") - (Catch::Benchmark::Chronometer meter) - { - auto gui = juce::ScopedJuceInitialiser_GUI {}; - - PluginProcessor plugin; - - // due to complex construction logic of the editor, let's measure open/close together - meter.measure ([&] (int /* i */) { - auto editor = plugin.createEditorIfNeeded(); - plugin.editorBeingDeleted (editor); - delete editor; - return plugin.getActiveEditor(); - }); - }; -}