Compare commits
3 Commits
2e8fd1d17d
...
8d7dea30e9
| Author | SHA1 | Date |
|---|---|---|
|
|
8d7dea30e9 | |
|
|
4b1a136e1e | |
|
|
f71f38c666 |
|
|
@ -61,10 +61,6 @@ pub async fn get_metrics_from_monitoring(duration: usize, delay: usize) -> anyho
|
||||||
warn!("Session dropped, creating new ...");
|
warn!("Session dropped, creating new ...");
|
||||||
break 'inner;
|
break 'inner;
|
||||||
}
|
}
|
||||||
// if let Err(_) = a.get_measure_info(vec.clone()).await {
|
|
||||||
// warn!("Session dropped, creating new ...");
|
|
||||||
// break 'inner;
|
|
||||||
// }
|
|
||||||
tokio::time::sleep(tokio::time::Duration::from_secs(delay as u64)).await
|
tokio::time::sleep(tokio::time::Duration::from_secs(delay as u64)).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -376,7 +376,7 @@ pub mod enode_monitoring {
|
||||||
impl Default for Query {
|
impl Default for Query {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
id : vec!["/measures/device$18".to_owned()],
|
id : vec!["/measures/device$18".to_owned(), "/measures/device$19".to_owned()],
|
||||||
data : Data::default(),
|
data : Data::default(),
|
||||||
post_query : "links".to_owned(),
|
post_query : "links".to_owned(),
|
||||||
enable_actions : false,
|
enable_actions : false,
|
||||||
|
|
@ -476,14 +476,9 @@ pub mod enode_monitoring {
|
||||||
|
|
||||||
pub fn get_chunk_size(total_measures: usize) -> usize {
|
pub fn get_chunk_size(total_measures: usize) -> usize {
|
||||||
match total_measures {
|
match total_measures {
|
||||||
0..=144 => total_measures,
|
0..=432 => total_measures,
|
||||||
145..=288 => total_measures / 4,
|
433..=1008 => total_measures / 2,
|
||||||
289..=432 => total_measures / 5,
|
_ => total_measures / 4,
|
||||||
433..=576 => total_measures / 6,
|
|
||||||
577..=720 => total_measures / 7,
|
|
||||||
721..=864 => total_measures / 8,
|
|
||||||
865..=1008 => total_measures / 9,
|
|
||||||
_ => total_measures / 10,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue