heistp / irtt

Isochronous Round-Trip Tester
GNU General Public License v2.0
185 stars 23 forks source link

Add -c switch for CSV logging on the client side. #27

Closed eric-s-raymond closed 3 years ago

heistp commented 3 years ago

I cloned from your forked repo but the output doesn't look quite right (missing comma after first field and rtt field not showing up).

$ ./irtt client -c localhost
[Connecting] connecting to localhost
[127.0.0.1:2112] [Connected] connection established
seq,rd,sd,seq,rtt,ipdv
0,131µs57.4µs,73.3µs,,n/a
1,562µs141µs,420µs,,431µs
2,237µs70.6µs,166µs,,324µs

I think the way I'd like to see this done is to add a -c boolean flag that switches the output format written to whatever is specified to -o, then update the corresponding docs, etc, rather than switching formats in the user output code. That way we can walk through the RoundTrips in the Result struct and implement it in a cleaner way. I'm also not sure we want units in the fields themselves, but probably just in the header, and ns might be better for external consumption.

This is easy enough for me that I'll offer to do it, today or tomorrow, if this functionality is still useful for you. How does that sound?

heistp commented 3 years ago

I'll try to review this at some point tomorrow.

eric-s-raymond commented 3 years ago

I'm withdrawing this pull request - it was based on a misunderstanding of Dave's requirements. I'll submit a smaller, cleaner one soon.

heistp commented 3 years ago

Ok, haven't had a chance to review it anyway, so sounds like that's for the best. :)