Performance

Track response time trends, health grades, and spot regressions across sessions.

Health Grades

Brakit assigns a health grade to each endpoint based on its p95 response time. This gives you an at-a-glance view of which endpoints are performing well and which need attention.

Fast
< 100ms
Good
100–299ms
OK
300–799ms
Slow
800ms–2s
Critical
≥ 2s

P95 Response Times

For each endpoint, brakit tracks the 95th percentile response time. This means 95% of requests are faster than the displayed value, giving you a realistic view of how your endpoints perform under normal conditions, without outliers skewing the average.

Metrics Persistence

Performance metrics are automatically saved to .brakit/metrics.json in your project root. This means your performance data survives across brakit restarts, so you can track trends over time.

The metrics file is created automatically. You may want to add .brakit/ to your .gitignore to keep local metrics out of version control.

Slow Thresholds

Brakit uses two separate thresholds:

  • Slow requests: HTTP requests taking longer than 2 seconds are flagged
  • Slow queries: Database queries taking longer than 100ms are flagged (stricter, since individual queries should be fast)
  • Slow endpoints: Endpoints averaging over 1 second are surfaced in Overview insights

Performance View

The Performance view in the dashboard shows:

  • Heat map: Visual density map of request latencies across all endpoints
  • Scatter chart: Individual request latencies plotted over time to spot patterns and outliers
  • Endpoint drill-down: Click any endpoint to see its query breakdown and query shape aggregation
  • Health grades: Every endpoint with its health grade and p95 time
  • Historical data: Trends from previous sessions so you can track improvement over time

Regression Detection

Brakit automatically compares current session metrics against previous sessions. If an endpoint's p95 latency or query count increases significantly, brakit flags it as a regression. This catches performance degradations early — before they reach production.

  • P95 latency regression: Response time increased compared to the previous baseline
  • Query count regression: Endpoint now runs more database queries than before