Add time/uptime/amendment_blocked to server_info (#775)

This commit is contained in:
Alex Kremer
2023-07-14 16:46:10 +01:00
committed by GitHub
parent b83d7478ef
commit b8705ae086
10 changed files with 139 additions and 12 deletions

View File

@@ -54,9 +54,10 @@ class Counters
std::atomic_uint64_t internalErrorCounter_;
std::reference_wrapper<const WorkQueue> workQueue_;
std::chrono::time_point<std::chrono::system_clock> startupTime_;
public:
Counters(WorkQueue const& wq) : workQueue_(std::cref(wq)){};
Counters(WorkQueue const& wq) : workQueue_(std::cref(wq)), startupTime_{std::chrono::system_clock::now()} {};
static Counters
make_Counters(WorkQueue const& wq)
@@ -94,6 +95,9 @@ public:
void
onInternalError();
std::chrono::seconds
uptime() const;
boost::json::object
report() const;
};