getSummary() is a convenience method that aggregates every available metric into a single plain object. It calls the same underlying getters as the individual methods (getDownloadBandwidth(), getUnloadedLatency(), etc.) and omits any key whose measurement was not performed or has not yet produced a result.
Return value
Download bandwidth in bits per second. Divide by
1e6 to convert to Mbps.Upload bandwidth in bits per second. Divide by
1e6 to convert to Mbps.Unloaded (idle) latency in milliseconds, at the configured percentile (default: median).
Unloaded jitter in milliseconds — average absolute difference between consecutive latency samples.
Latency measured while the connection is saturated with download traffic, in ms. Only present when
measureDownloadLoadedLatency is enabled (default: true).Jitter during active download load, in ms.
Latency measured while the connection is saturated with upload traffic, in ms. Only present when
measureUploadLoadedLatency is enabled (default: true).Jitter during active upload load, in ms.
Packet loss ratio between
0 (no loss) and 1 (100% loss). Only present when a packetLoss measurement was configured and a TURN server was reachable.Basic usage
Formatting values for display
Raw values use base units (bps, ms, ratio). Here is a helper that formats each field for display:Intermediate vs. final results
TheResults object is live — it updates as measurements complete. You can call getSummary() at any time, but its output changes as the test progresses.
- onResultsChange (intermediate)
- onFinish (final)
Called after each individual measurement completes. The summary may be partial — some keys will be absent until their measurement runs.
getSummary() and the individual getter methods return the same values. Use getSummary() when you need all metrics at once (e.g., for logging or sending to an analytics endpoint). Use the individual getters when you need a specific metric in a reactive UI.