Add request stats to instance info HTML

This commit is contained in:
Matthew Esposito 2023-05-31 20:02:00 -04:00
parent de68409610
commit 255307a4f7
No known key found for this signature in database

View File

@ -128,6 +128,8 @@ impl InstanceInfo {
["Deploy timestamp", &self.deploy_unix_ts.to_string()],
["Compile mode", &self.compile_mode],
["SFW only", &convert(&self.config.sfw_only)],
["Reddit request count", &self.reddit_requests.load(std::sync::atomic::Ordering::SeqCst).to_string()],
["Total request count", &self.total_requests.load(std::sync::atomic::Ordering::SeqCst).to_string()],
])
.with_header_row(["Settings"]),
);
@ -161,6 +163,8 @@ impl InstanceInfo {
Deploy timestamp: {}\n
Compile mode: {}\n
SFW only: {:?}\n
Reddit request count: {}\n
Total request count: {}\n
Config:\n
Banner: {:?}\n
Hide awards: {:?}\n
@ -181,6 +185,8 @@ impl InstanceInfo {
self.deploy_unix_ts,
self.compile_mode,
self.config.sfw_only,
self.reddit_requests.load(std::sync::atomic::Ordering::SeqCst),
self.total_requests.load(std::sync::atomic::Ordering::SeqCst),
self.config.banner,
self.config.default_hide_awards,
self.config.default_theme,