Remove all stats tracking (fixes #7)

This commit is contained in:
Matthew Esposito 2023-12-30 10:22:49 -05:00
parent d86b77ab56
commit 53e8811f32
No known key found for this signature in database
6 changed files with 2 additions and 68 deletions

View file

@ -20,11 +20,10 @@ use std::{
result::Result,
str::{from_utf8, Split},
string::ToString,
sync::atomic::Ordering::SeqCst,
};
use time::Duration;
use crate::{config, dbg_msg, instance_info::INSTANCE_INFO};
use crate::dbg_msg;
type BoxResponse = Pin<Box<dyn Future<Output = Result<Response<Body>, String>> + Send>>;
@ -235,11 +234,6 @@ impl Server {
match router.recognize(&format!("/{}{}", req.method().as_str(), path)) {
// If a route was configured for this path
Ok(found) => {
if config::get_setting("REDLIB_DISABLE_STATS_COLLECTION").is_none() {
// Add to total_requests count
INSTANCE_INFO.total_requests.fetch_add(1, SeqCst);
}
let mut parammed = req;
parammed.set_params(found.params().clone());