esnet / iperf

iperf3: A TCP, UDP, and SCTP network bandwidth measurement tool
Other
6.89k stars 1.27k forks source link

Enhancement request: Fractional second test duration (-t) #1007

Open zhibindaxia opened 4 years ago

zhibindaxia commented 4 years ago

Is -t parameter can only accept integers? When I use server: iperf3 -s -p 5001 -i 0.1 & client: iperf3 -c 10.0.0.1 -p 5001 -i 0.1 -t 0.1 The result is a endless stream

bmah888 commented 4 years ago

Right, the -t flag only takes integer parameters. Is there actually a use case for accepting floating-point test durations?

So in the sample command-line above, the -t 0.1 is interpreted as -t 0, which basically means to run forever. Upon looking, I don't see anything in the documentation that covers this fact, so we probably ought to add some words for this.

zhibindaxia commented 4 years ago

Yes, I need floating-point tests to shorten the experimental sampling time (such as sampling once per rtt).

Better experimental results can be achieved

------------------ 原始邮件 ------------------ 发件人: "Bruce A. Mah"<notifications@github.com>; 发送时间: 2020年5月29日(星期五) 凌晨0:51 收件人: "esnet/iperf"<iperf@noreply.github.com>; 抄送: "彭智彬"<814976254@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [esnet/iperf] On the problem of parameter -t (#1007)

Right, the -t flag only takes integer parameters. Is there actually a use case for accepting floating-point test durations?

So in the sample command-line above, the -t 0.1 is interpreted as -t 0, which basically means to run forever. Upon looking, I don't see anything in the documentation that covers this fact, so we probably ought to add some words for this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

bmah888 commented 4 years ago

It sounds like what you really want is fractional-second measurement intervals (-i flag), which are indeed supported. I'm not convinced that a floating-point test duration -t is really useful, and while it's not conceptually hard to do, making this change has some consequences in other parameters as well (-O flag, changing variable types within different data structures, ensuring backward compatibility between different iperf3 versions, etc.).