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

print date&time every time it is executed #162

Open
O-ring opened this issue Dec 31, 2021 · 4 comments
Open

print date&time every time it is executed #162

O-ring opened this issue Dec 31, 2021 · 4 comments

Comments

@O-ring
Copy link

O-ring commented Dec 31, 2021

Hello everyone,

a useful feature to have would be, for sockperf, to write the date and time (in UTC format) each time a test is run.

Cheers,
Marco

@ChrisCoe
Copy link
Contributor

A user could run something like date for UTC time so not sure why feature is needed in sockperf. Would date && <sockperf cmd> work for your case? Are you looking for date/time at a specific state of a run? If so, then a change like that could be useful.

@O-ring
Copy link
Author

O-ring commented Jan 17, 2022

Hello Chris,

thanks for the response.

yes, I think it is useful that sockperf prints the date
and time of when the test is run. Sometimes I forget to
run 'date' and so I can't track back to when the test
was run.

For example 'iperf3' always prints date and time on
every test.

Marco

@ChrisCoe
Copy link
Contributor

ChrisCoe commented Jan 17, 2022

Hi Maro,

Gotcha, sounds reasonable to me.

I can work on this so UTC date/time is present at the start of each run (whether client or server).
I'll try to get this in within a month from now (busy at the moment). Please feel free to jump in and make the change if you like.

My suggestion: Change should happen in src/sockperf.ccp, specifically right after line

log_msg(MAGNETA "== version #%s == " ENDCOLOR, VERSION);

This way the UTC time is printed out before server/client distinction is made.
Pseudo Code:

// Display UTC date and time 
 log_msg("<UTC TIME>");  

Example of current output where first line has version log: image

-Christian

@O-ring
Copy link
Author

O-ring commented Jan 18, 2022

Hello Christian,

thanks for the response. I will wait for your update.

Marco

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

No branches or pull requests

2 participants