From c7b3c5712f73161f9e0fafd9025b6863bf406555 Mon Sep 17 00:00:00 2001 From: Victor Gao <10379359+vgao1996@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:28:31 -0700 Subject: [PATCH] [easy][cli] fix sorting bug in benchmarking code (#13983) --- crates/aptos/src/common/local_simulation.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/aptos/src/common/local_simulation.rs b/crates/aptos/src/common/local_simulation.rs index 8955326eaec25..8828445011b48 100644 --- a/crates/aptos/src/common/local_simulation.rs +++ b/crates/aptos/src/common/local_simulation.rs @@ -83,6 +83,7 @@ pub fn benchmark_transaction_using_debugger( times.push(t2 - t1); } + times.sort(); times[n / 2] };