Skip to content

Final interval report always delayed until result exchange #2019

Description

@illarionov

Current behavior

The final interval report is currently emitted only after the EXCHANGE_RESULTS phase. On high-latency links, this causes the last report to arrive much later than previous reports, breaking the uniform interval spacing. Most of this data is already included in the final summary, reducing its usefulness.

Steps to reproduce

1. Use a server with high network latency. On Linux, this can be emulated by adding artificial delay (e.g. via tc netem):

$ sudo tc qdisc add dev lo root handle 1: prio
$ sudo tc qdisc add dev lo parent 1:3 handle 30: netem delay 250ms

$ sudo tc filter add dev lo protocol ip parent 1:0 prio 3 u32 match ip dport 5201 0xffff flowid 1:3
$ sudo tc filter add dev lo protocol ip parent 1:0 prio 3 u32 match ip sport 5201 0xffff flowid 1:3

$ ./iperf3 -s -p 5201

2. Run iperf with a low reporting interval, JSON output, and timestamps:

./iperf3 -c 127.0.0.1 -p 5201 -t 2 -i 0.5 --json-stream | ts -s -m '%.s'

3. Observe the interval reports in the output. Example snippet:

2.490441 {"event":"start","data":{"connected":[{"socket":5,"local_host":"127.0.0.1"…
2.990999 {"event":"interval","data":{"streams":[{"socket":5,"start":0,"end":0.500543,"seconds":0.50054299831390381,…
3.490966 {"event":"interval","data":{"streams":[{"socket":5,"start":0.500543,"end":1.000544,"seconds":0.50000101327896118,…
3.990976 {"event":"interval","data":{"streams":[{"socket":5,"start":1.000544,"end":1.500556,"seconds":0.5000119805336,…
5.491367 {"event":"interval","data":{"streams":[{"socket":5,"start":1.500556,"end":2.00072,"seconds":0.500163972377777,…
5.991516 {"event":"end","data":{"streams":[{"sender":{"socket":5,"start":0,"end":2.00072,"seconds":2.00072,…

Note that the first interval reports are output every 0.5 seconds, but the final interval report is delayed by 1.5 seconds from the previous one, as it is emitted only after the results exchange phase.

Desired behavior

Emit the final interval report immediately after the test ends, before result exchange, to maintain uniform reporting intervals.

Version

iperf 3.20+ (cJSON 1.7.15)
Linux alexey 6.8.0-106-generic #106-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar  6 07:58:08 UTC 2026 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication, bind to device, support IPv4 don't fragment, POSIX threads, GSO/GRO support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions