Skip to content

Add TTFB dashboard to dev endpoint #88

Description

@justrach

Feature Request

Expose TTFB (Time to First Byte) metrics in the dev server UI.

Current State

TTFB is already tracked in server.zig and logged:

info(server): GET / 266µs (ttfb: 45us)

Proposed Enhancement

Add to /_mer/debug endpoint:

  • Average TTFB (last 100 requests)
  • P50/P95/P99 TTFB percentiles
  • Per-route TTFB breakdown
  • Request duration histogram

Implementation Ideas

  • Store metrics in a bounded ring buffer
  • Update atomically for thread safety
  • JSON endpoint for programmatic access: /_mer/debug?format=json&metrics=ttfb

Priority

P2 - Developer experience improvement

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions