feat: auto-flush stats timer, .env.json defaults, expose round-trip+timer tests

This commit is contained in:
2026-10-24 00:36:36 +02:00
parent 0bd9dcd584
commit 7d968fb7a0
5 changed files with 48 additions and 1 deletions
@@ -1,4 +1,5 @@
#include <cassert>
#include <chrono>
#include <cstdio>
#include <thread>
#include <vector>
@@ -91,6 +92,11 @@ int main() {
assert(sc.Query(out, false, err));
assert(out.find("GET") != std::string::npos && out.find("count=1") != std::string::npos);
assert(sc.Query(out, true, err) && out.front() == '[');
sc.StartAutoFlush(std::chrono::seconds(1));
sc.Note("POST", 1024, 1024, 1000);
std::this_thread::sleep_for(std::chrono::milliseconds(2500));
sc.StopAutoFlush();
assert(sc.Query(out, false, err) && out.find("POST") != std::string::npos);
std::remove(db.c_str());
}
printf("expose_test PASS\n");