mirror of
https://github.com/oxen-io/oxen-storage-server.git
synced 2023-12-13 21:00:26 +01:00
Refactors how stats are collected: - Keeping a rolling window of recent stats for every 10 minutes over the past hour so that when we rotate stats, we only chop off the 1h10min-1h counts, but always have a recent stats counter that reflects the last ~1h of requests. - Move the stats cleanup timer into the stats class itself - Make the all_stats class properly thread safe. Previously *parts* of it were thread safe but much of it wasn't, so really wasn't safe to be used without holding the owning service_node's global lock. - Fix various bugs in the stats values: - "reset_time" was never updated, but even if it had been, it was a steady_clock and being returned as time_since_epoch() which is a useless value. - recent_retrieve_requests wasn't being set at all in the returned json (instead recent_store_requests was set twice). - onion requests weren't being counted at all; instead every onion request bumped the proxy request counter - Got rid of exposing "current period" stats: instead we now just expose the recent request counters, which are calculated from current period + stored historic period values, thus giving you a count for requests over the last 1h5m (±5 minutes). - Replace time_t with modern time types - Don't indent/prettify json; in any case where you'd actually want it this is much better done via tools like `jq`. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
command_line.cpp | ||
command_line.h | ||
http.h | ||
https_server.cpp | ||
https_server.h | ||
main.cpp | ||
omq_server.cpp | ||
omq_server.h | ||
onion_processing.cpp | ||
onion_processing.h | ||
oxend_rpc.cpp | ||
oxend_rpc.h | ||
rate_limiter.cpp | ||
rate_limiter.h | ||
reachability_testing.cpp | ||
reachability_testing.h | ||
request_handler.cpp | ||
request_handler.h | ||
serialization.cpp | ||
serialization.h | ||
server_certificates.cpp | ||
server_certificates.h | ||
service_node.cpp | ||
service_node.h | ||
sn_record.h | ||
stats.cpp | ||
stats.h | ||
swarm.cpp | ||
swarm.h | ||
version.cpp.in | ||
version.h |