From 1c47276aedcc793861861c63ca072a54cc66fc2b Mon Sep 17 00:00:00 2001 From: Mayuresh Date: Thu, 9 Apr 2026 21:34:50 +0530 Subject: [PATCH] feat(benchmarks): display total runtime at end of run_benchmarks.sh --- benchmarks/run_benchmarks.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/benchmarks/run_benchmarks.sh b/benchmarks/run_benchmarks.sh index d4753d1..ae99cb9 100755 --- a/benchmarks/run_benchmarks.sh +++ b/benchmarks/run_benchmarks.sh @@ -18,6 +18,7 @@ # ============================================================================= set -euo pipefail +SCRIPT_START=$(date +%s) REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" RESULTS_DIR="$REPO_ROOT/benchmarks/results/$(date +%Y-%m-%d_%H-%M-%S)" BENCH_PKG="./benchmarks/e2e/..." @@ -127,10 +128,17 @@ if command -v go &>/dev/null; then fi # ── Summary ─────────────────────────────────────────────────────────────────── +SCRIPT_END=$(date +%s) +ELAPSED_SECS=$(( SCRIPT_END - SCRIPT_START )) +ELAPSED_MIN=$(( ELAPSED_SECS / 60 )) +ELAPSED_SEC_REM=$(( ELAPSED_SECS % 60 )) + echo "" echo "========================================" echo "✅ Benchmark run complete!" echo "" +echo "Total runtime : ${ELAPSED_MIN}m ${ELAPSED_SEC_REM}s" +echo "" echo "Results written to:" echo " $RESULTS_DIR" echo ""