-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Annotate server output and logs with "title" from the client. #1133
base: master
Are you sure you want to change the base?
Conversation
…k tests in server logs.
appropriate -> inappropriate
I just realized I forgot to update the JSON output. |
@berkakinci I think this is a good idea, so I have implemented your changes in a private iperf3 branch I maintain. I have some comments/suggestions:
if (test->title)
i += sprintf(linebuffer + i, "%s: ", test->title); |
@davidBar-On, thanks for the feedback.
Good.
That sounds great; less chatty.
My coworker and I went back and forth on this. In the end we settled on output even if not verbose. We considered it vital identifying info assuming you took the time to set --title. So in our use case, it's about as important as the IP address of the connected client. So non-verbose is where we settled. I don't know how others may be using --title, so that may not be desirable. (Do you know the other use cases for --title?)
(Side note: Those lines you quoted have buffer overflow hazards.) Again, I don't know the existing use cases. I actually end up using pretty long and descriptive titles. It's kind of annoying (to me) to see those prepend every line even on the client side while doing the test. This would be the same on the server side. I piggybacked on --title because it was easy. The purist in me would like to make it a new parameter to exchange, but the lazy side doesn't want to change any more than necessary. |
Regarding the above and:
I now understand your decision. If the title is not appended to each output line, then it is important to show it, not just in verbose mode. If the title is appended to each line, then that is not important. If and when the PR will be merged we will see what is the decision.
Sometimes I am running several clients in parallel from the same terminal, and the output from all clients are mixed. I also suggested a feature that allows one server to support several clients in parallel by executing a new server per client (PR #1074). In this case all servers outputs are displayed on the same terminal. |
Between your --title use case and ours, this compromise comes to mind:
However, my conscience is pushing me away from touching that I looked around that |
So, I think I'm going to need a little guidance from maintainers on this one. |
This is probably a question that @bmah888 can give the real answer, but from my experience it is better to keep these two issues separate, as they are not directly related. In general it is better to keep each PR as simple as possible. |
@berkakinci Apologies for the delay, I'm starting to look at iperf3 stuff now after a hiatus caused by other work priorities. In generally it's better two do separate, smaller fixes, although I haven't really examined #1133 or #1134 yet so I can't really comment on the specifics of those two changes. |
Version of iperf3 (or development branch, such as
master
or3.1-STABLE
) to which this pull request applies:master
Issues fixed (if any):
None in functionality; new feature
Typo in documentation.
Brief description of code changes (suitable for use as a commit message):
I had a desire to annotate server output (and logs) from the client. The use case example:
I would like to be able to identify what I was doing when browsing the server-side output. So I would like to leave a 'breadcrumb' (annotation) on the server invoked from the client.
This change accomplishes that. The client-set "--title" option now is also included on the Server output.
This parameter was already exchanged between server and client, so no major changes were necessary; just iperf_printf.