Skip to content

Commit

Permalink
chore(bench): added simulated latency to benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
10d9e committed Jan 10, 2025
1 parent be156d6 commit 50f05f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compute/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl Executor for LocalSimulator {
}
}

fn simulate_transfer_time_ms(payload: &Vec<u8>, latency: &f64) {
fn simulate_transfer_time_ms(payload: &[u8], latency: &f64) {
let bytes_size = payload.len() as f64;
let transfer_time = bytes_size / latency * 1000.0; // Convert seconds to milliseconds
sleep(Duration::from_millis(transfer_time as u64))
Expand Down

0 comments on commit 50f05f3

Please sign in to comment.