Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --json-immediate option. #1605

Closed
wants to merge 1 commit into from
Closed

Conversation

tom-cook-veea
Copy link

  • Version of iperf3 (or development branch, such as master or
    3.1-STABLE) to which this pull request applies: master

  • Issues fixed (if any): This addresses easily parseable real time output option #444, though possibly not as the filer intended.

  • Brief description of code changes (suitable for use as a commit message):

This change adds a new boolean flag, --json-immediate. This flag has three effects:

  • It implies --json/-J even if it is not also set.
  • It causes the JSON output to be printed without whitespace formatting, so that a complete JSON structure appears on one output line.
  • It causes the JSON structure for each interval to be printed out at the end of that interval. The usual JSON output is still printed at the end of the test.

The motivation is, as requested in #444, to provide machine-readable output in real time.

This flag has three effects:
* It implies `--json/-J` even if it is not also set.
* It causes the JSON output to printedd output without whitespace
  formatting, so that a complete JSON structure appears on one
  output line.
* It causes the JSON structure for each interval to be printed out
  at the end of that interval.  The usual JSON output is still
  printed at the end of the test.
@tom-cook-veea
Copy link
Author

I've added this because it's useful for us and I'm perfectly happy to maintain it as a fork for our use, but wanted to contribute it back in case it's useful to others.

@tom-cook-veea
Copy link
Author

Just noticed that this has considerable overlap with #1098, which is probably a better implementation of the same idea. It would be good to get some action on one of these, so that you don't keep getting PRs that duplicate the same work.

@swlars
Copy link
Contributor

swlars commented Dec 14, 2023

Just merged the other one! Thank you for the pull request!

@swlars swlars closed this Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants