Gap delay time between messages option #1343
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Version of iperf3 (or development branch, such as
master
or3.1-STABLE
) to which this pull request applies:master
Issues fixed (if any):
None
Brief description of code changes (suitable for use as a commit message):
Add an option
--gap
for setting random delay gap time between packets, instead of defining target bit rate. This is to allow creating test traffic profiles other then just fixed bit rate (and fixed delay between packets).--gap
receives two parametersn1[/n2]
. The delay is a random number betweenn1
andn2
. If onlyn1
is defined, thenn2
is set to 5 timesn1
. For fixed delay (equivalent for setting bit rate),n1
andn2
are set for the same value. By default the gap value unit is for Mili-sec, but it can also be defined as Seconds or Micro-secs (Sec/Mili/Micro units are specified by s/m/u).When
--gap
is set, burst default value 1 packet, to have the gap delay between each two packets. If bust option is set (using-b /<burst>
) the the gap delay is between bursts, not between packets.(This PR is a subset of the enhancements suggested by PR #1075, but with enhanced implementation - using the
select
timeout mechanism instead ofsleep
.)