Create an overtly performance checking build.

Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2021-10-11 19:52:22 +01:00
parent 59d1e2789e
commit b5074ac48c
2 changed files with 7 additions and 3 deletions

View File

@ -11,9 +11,11 @@
#include <unordered_map>
#include <vector>
#define USE_BOOST_JSON
//#define USE_NLOHMANN_JSON
//#define USE_JSONCPP_JSON
//#define TEST_JSON_PERFORMANCE
#define USE_BOOST_JSON // 32 seconds
//#define USE_NLOHMANN_JSON // 58 seconds
//#define USE_JSONCPP_JSON // 88 seconds
#ifdef USE_BOOST_JSON
# include <boost/json.hpp>

View File

@ -40,6 +40,7 @@ int main() {
const auto opcode_test = test_t(opcode_test_element);
TestRunner runner(opcode_test);
#ifndef TEST_JSON_PERFORMANCE
const auto good = runner.check();
if (!good) {
if (!opcode_bad) {
@ -49,6 +50,7 @@ int main() {
opcode_bad = true;
}
}
#endif
}
}