From 2ecdbddf8fccbfe66cf5512089bd6754dae71e1f Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Wed, 7 Jan 2026 16:31:02 +0000 Subject: [PATCH] also log elapsed time --- .../coder/modules/agentapi/scripts/agentapi-wait-for-start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/registry/coder/modules/agentapi/scripts/agentapi-wait-for-start.sh b/registry/coder/modules/agentapi/scripts/agentapi-wait-for-start.sh index 72e9a1dc..aef98bcb 100644 --- a/registry/coder/modules/agentapi/scripts/agentapi-wait-for-start.sh +++ b/registry/coder/modules/agentapi/scripts/agentapi-wait-for-start.sh @@ -11,10 +11,12 @@ port=${1:-3284} agentapi_started=false echo "Waiting for agentapi server to start on port $port..." +start=$(date +%s) while true; do if curl -f "http://localhost:$port/status"; then - echo "$(date): agentapi response received" agentapi_started=true + elapsed=$(($(date +%s) - start)) + echo "$(date): agentapi server started after $elapsed seconds" break else echo "$(date): agentapi server not responding"