fix: Hz of proved Program (#12)

Signed-off-by: hcotry <hcotry@163.com>
This commit is contained in:
hcotry 2024-10-18 12:23:34 -07:00 committed by GitHub
parent 1435971226
commit a48c121a3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -279,13 +279,13 @@ async fn main() {
proof: Some(proof::Proof::NovaBytes(buf)), proof: Some(proof::Proof::NovaBytes(buf)),
})), })),
}; };
let duration = SystemTime::now().duration_since(start_time).unwrap();
let proof_cycles_hertz = cycles_proven * 1000 / duration.as_millis();
let proof_cycles_per_minute = cycles_proven * 60 * 1000 / duration.as_millis();
client client
.send(Message::Binary(response.encode_to_vec())) .send(Message::Binary(response.encode_to_vec()))
.await .await
.unwrap(); .unwrap();
let duration = SystemTime::now().duration_since(start_time).unwrap();
let proof_cycles_hertz = cycles_proven * 1000 / duration.as_millis();
let proof_cycles_per_minute = cycles_proven * 60 * 1000 / duration.as_millis();
track( track(
"proof".into(), "proof".into(),
format!("Proof sent! You proved at {} Hz.", proof_cycles_hertz), format!("Proof sent! You proved at {} Hz.", proof_cycles_hertz),