Fix for issue #952 - different json object names for bidir reverse ch…#1200
Merged
bmah888 merged 1 commit intoesnet:masterfrom Nov 8, 2021
Merged
Conversation
bmah888
reviewed
Oct 21, 2021
| if ((test->role == 'c' && !stream_must_be_sender) || | ||
| (test->role != 'c' && stream_must_be_sender)) | ||
| { | ||
| sum_name = "sum_bdir_reverse"; |
Contributor
There was a problem hiding this comment.
Would it be possible to change this to sum_bidir_reverse instead in order to match the spelling of the --bidir option?
bmah888
reviewed
Oct 21, 2021
Comment on lines
+3701
to
+3703
| sum_name = "sum_bdir_reverse"; | ||
| sum_sent_name = "sum_sent_bdir_reverse"; | ||
| sum_received_name = "sum_received_bdir_reverse"; |
Contributor
There was a problem hiding this comment.
Similarly to a comment above, could the new names be sum_bidir_reverse, sum_sent_bidir_reverse, and sum_received_bidir_reverse in order to match the spelling of the --bidir command-line option?
Contributor
|
Thanks for the PR! I'd like to merge this after a few changes to the new names for the JSON structures. |
Contributor
|
I'm going to merge this as-is, and then do a follow-up commit to change the identifiers per comments above. Thanks! |
bmah888
added a commit
that referenced
this pull request
Nov 8, 2021
Follow-up to #1200: s/bdir/bidir/ in JSON identifiers per review comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
masteror3.1-STABLE) to which this pull request applies:Latest master code
Issues fixed (if any):
iperf3 json output unparsable with bidir option set #952 (Yest another try to fix it.)
Brief description of code changes (suitable for use as a commit message):
When BIDIR is set, give a different JSON object name to the sum and sent/receive sums.
The different names are given to the data sent from the server, which is the "reverse" channel. This makes sure that the name reported on the server and client are compatible, and that the names are the same as with non-bdir, except for when reverse mode is used.
With this approach there is no change to JSON output for non-bidir tests. In addition, and programs that know to read the server and client JSON output for the non-bidir case should be able to work properly also when bidir is specified.
Programs changes are required only if they already analyse the "reverse" channel output for the bidir case, but since currently these JSON outputs has duplicate keys, probably there are very few cases where this is done.