Skip to content

Commit

Permalink
fix: remove debug_assertions attr (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyannyacha authored Apr 22, 2024
1 parent 28faf77 commit f8dfb56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 2 additions & 11 deletions crates/base/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,17 +614,8 @@ impl Server {

loop {
let active_io = metric_src.active_io();
let received_request_count = if cfg!(debug_assertions) {
metric_src.received_requests()
} else {
0
};

let handled_request_count = if cfg!(debug_assertions) {
metric_src.handled_requests()
} else {
0
};
let received_request_count = metric_src.received_requests();
let handled_request_count = metric_src.handled_requests();

trace!(
"io: {}, received: {}, handled: {}",
Expand Down
2 changes: 0 additions & 2 deletions crates/sb_core/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ impl SharedMetricSource {
self.active_io.load(Ordering::Relaxed)
}

#[cfg(debug_assertions)]
pub fn received_requests(&self) -> usize {
self.received_requests.load(Ordering::Relaxed)
}

#[cfg(debug_assertions)]
pub fn handled_requests(&self) -> usize {
self.handled_requests.load(Ordering::Relaxed)
}
Expand Down

0 comments on commit f8dfb56

Please sign in to comment.