diff options
Diffstat (limited to 'src/gatherer.rs')
-rw-r--r-- | src/gatherer.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gatherer.rs b/src/gatherer.rs index 93db7ce..accd50d 100644 --- a/src/gatherer.rs +++ b/src/gatherer.rs @@ -134,6 +134,8 @@ pub fn make_mem_graph(state: &AwakeState) { gif.save(path).unwrap(); } +const NET_INCREMENTS: usize = 256; + pub fn make_net_graph(state: &AwakeState) { tracing::debug!("generating netinfo graph"); @@ -169,7 +171,11 @@ pub fn make_net_graph(state: &AwakeState) { mixed.sort(); let kinda_highest = mixed[511 - 32]; - let high_bound = (kinda_highest as f32 / 64.0).ceil().max(1.0) as usize * 64; + let high_bound = (kinda_highest as f32 / NET_INCREMENTS as f32) + .ceil() + .max(1.0) as usize + * NET_INCREMENTS; + state .netinfo_upper_bound .store(high_bound, Ordering::Release); |