Commit Graph

1 Commits

Author SHA1 Message Date
Nikil Viswanathan
4ee87252df feat: add request profiling utilities
Adds a lightweight profiling system for measuring latency across the
message processing pipeline.

Features:
- createRequestProfiler() to track timing marks
- Automatic segment calculation between marks
- Log-friendly output format
- Global enable/disable config

Usage example:
  const profiler = createRequestProfiler();
  profiler.mark('channel_received');
  profiler.mark('media_downloaded');
  profiler.mark('agent_invoked');
  profiler.mark('response_sent');
  console.log(profiler.toLogString());

This lays the groundwork for integrating profiling into the main
message dispatch flow to identify latency bottlenecks.

Closes #XXXX
2026-01-25 14:54:58 -05:00