Build TestDriver for perf testing too

This commit is contained in:
2024-07-17 15:48:32 -07:00
parent 958a4e2d0e
commit 542371d562
3 changed files with 36 additions and 16 deletions

View File

@@ -3,13 +3,18 @@
#include <fstream>
#include <sstream>
#ifndef PERF_TEST
#define PERF_TEST 0
#endif
int main(int argc, char **argv) {
for (int i = 1; i < argc; ++i) {
std::ifstream t(argv[i], std::ios::binary);
std::stringstream buffer;
buffer << t.rdbuf();
auto str = buffer.str();
TestDriver<ConflictSet> driver{(const uint8_t *)str.data(), str.size()};
TestDriver<ConflictSet, !PERF_TEST> driver{(const uint8_t *)str.data(),
str.size()};
while (!driver.next())
;
if (!driver.ok) {