feat(benchmarks): display total runtime at end of run_benchmarks.sh

This commit is contained in:
Mayuresh
2026-04-09 21:34:50 +05:30
parent beb0a3205e
commit 1c47276aed

View File

@@ -18,6 +18,7 @@
# ============================================================================= # =============================================================================
set -euo pipefail set -euo pipefail
SCRIPT_START=$(date +%s)
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
RESULTS_DIR="$REPO_ROOT/benchmarks/results/$(date +%Y-%m-%d_%H-%M-%S)" RESULTS_DIR="$REPO_ROOT/benchmarks/results/$(date +%Y-%m-%d_%H-%M-%S)"
BENCH_PKG="./benchmarks/e2e/..." BENCH_PKG="./benchmarks/e2e/..."
@@ -127,10 +128,17 @@ if command -v go &>/dev/null; then
fi fi
# ── Summary ─────────────────────────────────────────────────────────────────── # ── 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 "========================================" echo "========================================"
echo "✅ Benchmark run complete!" echo "✅ Benchmark run complete!"
echo "" echo ""
echo "Total runtime : ${ELAPSED_MIN}m ${ELAPSED_SEC_REM}s"
echo ""
echo "Results written to:" echo "Results written to:"
echo " $RESULTS_DIR" echo " $RESULTS_DIR"
echo "" echo ""