Skip to content

Commit

Permalink
Make testing debug statements into trace statements
Browse files Browse the repository at this point in the history
  • Loading branch information
williampsmith committed Nov 3, 2024
1 parent 77a25b6 commit f8cd99d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 5 additions & 7 deletions crates/sui-core/src/traffic_controller/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,7 @@ async fn run_clear_blocklists_loop(blocklists: Blocklists, metrics: Arc<TrafficC
metrics
.connection_ip_blocklist_len
.set(blocklists.clients.len() as i64);
error!(
"TESTNG -- connection_ip_blocklist: {:?}",
blocklists.clients
);
debug!("Connection_ip_blocklist: {:?}", blocklists.clients);
metrics
.proxy_ip_blocklist_len
.set(blocklists.proxied_clients.len() as i64);
Expand Down Expand Up @@ -435,9 +432,10 @@ async fn handle_error_tally(
if !error_weight.is_sampled() {
return Ok(());
}
error!(
"TESTNG -- handling error_type {:?} from client {:?}",
error_type, tally.direct,
trace!(
"Handling error_type {:?} from client {:?}",
error_type,
tally.direct,
);
metrics
.tally_error_types
Expand Down
10 changes: 6 additions & 4 deletions crates/sui-core/src/traffic_controller/policies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::hash::Hash;
use std::time::Duration;
use std::time::{Instant, SystemTime};
use sui_types::traffic_control::{FreqThresholdConfig, PolicyConfig, PolicyType, Weight};
use tracing::{error, info};
use tracing::{info, trace};

const HIGHEST_RATES_CAPACITY: usize = 20;

Expand Down Expand Up @@ -361,9 +361,11 @@ impl FreqThresholdPolicy {
let key = SketchKey(source, ClientType::Direct);
self.sketch.increment_count(&key);
let req_rate = self.sketch.get_request_rate(&key);
error!(
"TESTNG -- req_rate: {:?}, client_threshold: {:?}, client: {:?}",
req_rate, self.client_threshold, source,
trace!(
"FreqThresholdPolicy handling tally -- req_rate: {:?}, client_threshold: {:?}, client: {:?}",
req_rate,
self.client_threshold,
source,
);
if req_rate >= self.client_threshold as f64 {
Some(source)
Expand Down

0 comments on commit f8cd99d

Please sign in to comment.