From 4ba117e467e0d29ffb90f82a4e8d009c71220b75 Mon Sep 17 00:00:00 2001 From: eiiko6 Date: Thu, 2 Apr 2026 08:56:54 +0200 Subject: [PATCH] now using actual cpu score instead of just multithread --- server/src/main.rs | 2 +- src/main.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/main.rs b/server/src/main.rs index 51a8358..e6b1f1c 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -68,7 +68,7 @@ async fn submit( let score = payload .benchmark .as_ref() - .map(|b| b.multi_thread.score) + .map(|b| (b.multi_thread.score + b.single_thread.score) / 2) .unwrap_or(0); let raw_json = serde_json::to_value(&payload) diff --git a/src/main.rs b/src/main.rs index ae4fec9..cf93813 100644 --- a/src/main.rs +++ b/src/main.rs @@ -148,6 +148,10 @@ fn main() { scaling_color_formatter(format!("{:.2}x", multi_thread_speedup_ratio)).bold() ); + let score = (multithread_benchmark.score + singlethread_benchmark.score) / 2; + + println!("\nCPU Score : {score}",); + report.benchmark = Some(BenchmarkReport { prime_limit: cli.prime_limit, logical_cores: logical_core_count,