Philter.Timing (Philter v0.4.0)

Copy Markdown View Source

Per-phase timing for proxy requests.

Durations are measured directly around the Mint transport calls using System.monotonic_time/1: connect_us (TCP + TLS handshake), send_us (request send) and recv_us (response receive). There is no connection pool, so queue_us and idle_time_us are always nil and reused_connection? is always false.

Populated only when collect_timing: true is passed to Philter.proxy/2; otherwise every phase field is nil.

Summary

Functions

Builds a phase-timing map from measured microsecond durations.

Functions

new(connect_us, send_us, recv_us)

@spec new(non_neg_integer() | nil, non_neg_integer() | nil, non_neg_integer() | nil) ::
  t()

Builds a phase-timing map from measured microsecond durations.

queue_us and idle_time_us are always nil and reused_connection? is always false because the Mint transport establishes a fresh connection per request with no pool.