Feature

Stream Probe 0.5.0: TTFB and Network Timing Metrics

TL;DR Snapshot

Stream Probe 0.5.0 adds TTFB tracking to the Segments overlay. A new TimingDataSourceFactory measures how long each segment's open() call takes, and a thread-safe NetworkTimingRegistry pipes that data through to PlayerInterceptor so you can see network timing right next to your segment data.

Share this update

Stream Probe 0.5.0 introduces Time to First Byte (TTFB) tracking for video segments, visible directly in the Segments overlay.

TL;DR

You can now see exactly how long each video segment takes to start downloading. A new TimingDataSourceFactory wraps your existing DataSource.Factory and measures the open() duration, feeding that data into the Segments overlay without any changes to your player setup.

What's New

  • TimingDataSourceFactory: Wraps the host DataSource.Factory to intercept and time each open() call, capturing TTFB at the network layer
  • NetworkTimingRegistry: A thread-safe registry that handles metric handoff between network threads and the player thread, so timing data never gets lost or corrupted
  • PlayerInterceptor updates: Now reads from NetworkTimingRegistry and attaches TTFB values to each SegmentMetric automatically
  • Segments overlay UI update: TTFB is now displayed alongside existing segment data, so you can spot slow-loading segments at a glance
  • Version bump to 0.5.0

How to Use

No changes required if you're already using PlayerInterceptor. Stream Probe wires TimingDataSourceFactory into your player's data source automatically. TTFB values will appear in the Segments tab of the debug overlay the next time you run your app.

If you're integrating manually, wrap your DataSource.Factory:

// TimingDataSourceFactory wraps your existing factory
let timedFactory = TimingDataSourceFactory(wrapping: yourDataSourceFactory)

FAQ