summaryrefslogtreecommitdiff
path: root/test/perf-ingest.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-08-27 20:49:18 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-09-01 20:02:59 +0100
commita795f8e1ece4209e587e237f5b084ec92df21a90 (patch)
treeb8bc1248bac0ef0dc309b17e8d09e850723775a4 /test/perf-ingest.cpp
parent720b701fac13f464addb2116301d9a9a2998d041 (diff)
downloadwebstat-a795f8e1ece4209e587e237f5b084ec92df21a90.tar.bz2
webstat-a795f8e1ece4209e587e237f5b084ec92df21a90.tar.xz
webstat-a795f8e1ece4209e587e237f5b084ec92df21a90.zip
Use a DB connection pool rather than a single connection
Diffstat (limited to 'test/perf-ingest.cpp')
-rw-r--r--test/perf-ingest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/perf-ingest.cpp b/test/perf-ingest.cpp
index 6de3dae..36a3b49 100644
--- a/test/perf-ingest.cpp
+++ b/test/perf-ingest.cpp
@@ -102,7 +102,7 @@ namespace {
void
doIngestFile(benchmark::State & state)
{
- WebStat::Ingestor ingestor {"perf-hostname", DB::MockDatabase::openConnectionTo("webstat")};
+ WebStat::Ingestor ingestor {"perf-hostname", std::make_shared<WebStat::MockDBPool>("webstat")};
for (auto loop : state) {
WebStat::FilePtr logFile {fopen(TMP_LOG.c_str(), "r")};
ingestor.ingestLog(logFile.get());