Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Adds millisecond-precision timing to identify startup performance bottlenecks in MCP gateway initialization.

Changes

Modified scripts:

  • check_mcp_servers.sh - Times config validation, per-server checks, overall execution
  • start_mcp_gateway.sh - Times config I/O, validation, container launch, health polling, conversion, server checks, total startup
  • verify_mcp_gateway_health.sh - Times health polling, config verification, connectivity tests, total verification

Implementation:

print_timing() {
  local start_time=$1
  local label=$2
  local end_time=$(date +%s%3N)
  local duration=$((end_time - start_time))
  echo "⏱️  TIMING: $label took ${duration}ms"
}

Example output:

⏱️  TIMING: Configuration validation took 156ms
⏱️  TIMING: Server check for github took 2347ms
⏱️  TIMING: Health check wait took 42156ms
⏱️  TIMING: Overall gateway startup took 48159ms

All timing prefixed with ⏱️ TIMING: for log filtering: grep "⏱️ TIMING:" logs


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Add timing information to startup setup scripts Add timing instrumentation to MCP gateway setup scripts Jan 30, 2026
Copilot AI requested a review from lpcox January 30, 2026 18:28
@lpcox lpcox marked this pull request as ready for review January 30, 2026 18:31
@lpcox lpcox merged commit 92c578c into main Jan 30, 2026
146 checks passed
@lpcox lpcox deleted the copilot/improve-startup-performance-timing branch January 30, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants