feat: auto-flush stats timer, .env.json defaults, expose round-trip+timer tests
This commit is contained in:
@@ -83,7 +83,8 @@ ExitCode RunExposeServe(const ParsedArgs& args, Output& out) {
|
||||
auto& sc = realtime::expose::StatsCollector::Global();
|
||||
sc.Configure(realtime::expose::MakeStatsStore(""));
|
||||
std::string serr;
|
||||
(void)sc.Flush(serr); // ensure schema exists; batch flushes follow on timer
|
||||
(void)sc.Flush(serr); // ensure schema exists
|
||||
sc.StartAutoFlush(); // time-based persisted flush (STATS_FLUSH_SECS, default 5s)
|
||||
molo::app::views::View::SetObserver([](const std::string& m, std::uint64_t bi,
|
||||
std::uint64_t bo, std::uint64_t us) {
|
||||
realtime::expose::StatsCollector::Global().Note(m, bi, bo, us);
|
||||
|
||||
Reference in New Issue
Block a user