about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgennyble <gen@nyble.dev>2025-10-16 10:32:31 -0500
committergennyble <gen@nyble.dev>2025-10-16 10:32:31 -0500
commitefda88d41f5d055517c7ce3e1fe1bb31053ada03 (patch)
treead96d8c19b35afe4bbac1f883f9eb4480a3a9eec
parent0515c34017706e43588644387b68a6bb08cc390c (diff)
downloadawake-efda88d41f5d055517c7ce3e1fe1bb31053ada03.tar.gz
awake-efda88d41f5d055517c7ce3e1fe1bb31053ada03.zip
only scale by a 3rd on cpu and net on 512kbps
-rw-r--r--src/gatherer.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gatherer.rs b/src/gatherer.rs
index 9bfd63a..36b7468 100644
--- a/src/gatherer.rs
+++ b/src/gatherer.rs
@@ -173,10 +173,15 @@ pub fn make_net_graph(state: &AwakeState) {
 	let kinda_highest = mixed[511 - 32];
 	// We add one here so we have less "surface area" covered by the lines
 	// which makes the vertical divisions look btter
-	let high_bound = ((kinda_highest as f32 / NET_INCREMENTS as f32)
+	let high_bound_whole = (kinda_highest as f32 / NET_INCREMENTS as f32)
 		.ceil()
-		.max(1.0) as usize
-		+ 1) * NET_INCREMENTS;
+		.max(1.0) as usize;
+
+	let high_bound = if high_bound_whole > 1 {
+		high_bound_whole + 1
+	} else {
+		high_bound_whole
+	} * NET_INCREMENTS;
 
 	state
 		.netinfo_upper_bound