From b1107f944dcfb4e807fe0fa2981f280fc170a687 Mon Sep 17 00:00:00 2001 From: flea Date: Tue, 2 Apr 2024 06:27:06 +0000 Subject: [PATCH] remove useless print logic --- sentinel-core/src/core/log/metric/aggregator.rs | 4 ---- sentinel-core/src/datasource/property.rs | 2 -- 2 files changed, 6 deletions(-) diff --git a/sentinel-core/src/core/log/metric/aggregator.rs b/sentinel-core/src/core/log/metric/aggregator.rs index b68f5d1..a6773c8 100644 --- a/sentinel-core/src/core/log/metric/aggregator.rs +++ b/sentinel-core/src/core/log/metric/aggregator.rs @@ -44,7 +44,6 @@ pub fn write_task(mut map: MetricTimeMap) { } // Sort the time keys.sort_unstable(); - println!("keys: {:?}", keys); let writer = METRIC_WRITER.as_ref().unwrap(); let mut writer = writer.lock().unwrap(); @@ -73,13 +72,10 @@ pub fn do_aggregate() { current_metric_items(stat::inbound_node(), cur_time), stat::inbound_node(), ); - println!("map: {:?}", map); // Update current last fetch timestamp. LAST_FETCH_TIME.store(cur_time, Ordering::SeqCst); - println!("Store last fetch time {}", cur_time); - if !map.is_empty() { std::thread::spawn(move || write_task(map)); } diff --git a/sentinel-core/src/datasource/property.rs b/sentinel-core/src/datasource/property.rs index e838592..91a68cf 100644 --- a/sentinel-core/src/datasource/property.rs +++ b/sentinel-core/src/datasource/property.rs @@ -11,8 +11,6 @@ pub type PropertyConverter

= fn(src: &str) -> Result>>; pub fn rule_json_array_parser( src: &str, ) -> Result>> { - println!("{:?}", src); - println!("{:?}", serde_json::from_str::>(src)); let rules: Vec

= serde_json::from_str(src)?; Ok(rules.into_iter().map(|r| Arc::new(r)).collect()) }