mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-07 23:27:51 +00:00
Remove all stats tracking (fixes #7)
This commit is contained in:
parent
d86b77ab56
commit
53e8811f32
6 changed files with 2 additions and 68 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue