#include "dnsdist.hh"
GlobalStateHolder<CarbonConfig> g_carbon;
+static time_t s_start=time(0);
+uint64_t uptimeOfProcess(const std::string& str)
+{
+ return time(0) - s_start;
+}
void* carbonDumpThread()
try
#include <thread>
#include "sholder.hh"
void* carbonDumpThread();
+uint64_t uptimeOfProcess(const std::string& str);
struct DNSDistStats
{
using stat_t=std::atomic<uint64_t>; // aww yiss ;-)
{"latency100-1000", &latency100_1000}, {"latency-slow", &latencySlow},
{"latency-avg100", &latencyAvg100}, {"latency-avg1000", &latencyAvg1000},
{"latency-avg10000", &latencyAvg10000}, {"latency-avg1000000", &latencyAvg1000000},
+ {"uptime", uptimeOfProcess},
{"real-memory-usage", getRealMemoryUsage}
};
};