summaryrefslogtreecommitdiff
path: root/test/perf-ingest.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-03-20 23:48:32 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-03-20 23:48:32 +0000
commit05c47ab65e73b16887b7c7a1eb31acf6d364ef41 (patch)
tree837a65e5460154a8c00c91519a8ea313445ad1dd /test/perf-ingest.cpp
parent0f5a0a8e2d43774288d4d6ea747278ca6e085a2a (diff)
downloadwebstat-05c47ab65e73b16887b7c7a1eb31acf6d364ef41.tar.bz2
webstat-05c47ab65e73b16887b7c7a1eb31acf6d364ef41.tar.xz
webstat-05c47ab65e73b16887b7c7a1eb31acf6d364ef41.zip
Add logging :-o
Adds virtual log function, real implementation writes to syslog. Test implementation writes to BOOST_TEST_MESSAGE, perf implementation discards. Replaces existing prints to stderr and adds logs to all key points.
Diffstat (limited to 'test/perf-ingest.cpp')
-rw-r--r--test/perf-ingest.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/perf-ingest.cpp b/test/perf-ingest.cpp
index c403349..cf0be0d 100644
--- a/test/perf-ingest.cpp
+++ b/test/perf-ingest.cpp
@@ -18,10 +18,19 @@ namespace {
static const WebStat::MockDB mockdb;
}
+ class PerfIngestor : public WebStat::Ingestor {
+ using Ingestor::Ingestor;
+
+ void
+ log(int, const char *, ...) const override
+ {
+ }
+ };
+
void
doIngestFile(benchmark::State & state)
{
- WebStat::Ingestor ingestor {WebStat::getTestUtsName("perf-hostname"),
+ PerfIngestor ingestor {WebStat::getTestUtsName("perf-hostname"),
std::make_shared<WebStat::MockDBPool>("webstat"),
{
.userAgentAPI = {},