Print bytes sent in human readable format
MrBruz opened this issue · 4 comments
As seen here the logger that logs to terminal returns the exact amount of bytes, which is well and good for JSON processing by other programs, but this is not ideal for human readers quickly checking the rough amount of data being sent.
My recommended solution is to automatically format bytes sent in a human readable manor but only when sent to terminal, but keep current style with JSON logging.
An alternative, or additional nice thing to have, would be occasional prints to the console of the running total. Like after every n
connected clients, print the total data transfer etc.
btw see here: https://github.com/yunginnanet/Rate5/blob/6fda3907504eb711cd0ab1c8c0c9f398d9008b42/speedometer/speedometer.go
and here: yunginnanet/Rate5#11
its pretty much ready too as far as i can tell but i never have anyone to review my code so i can be a bit hesitant at times
@yunginnanet I can take a look later if you want a sanity check? Go isn't my first language but two sets of eyeballs is always nice
@yunginnanet I can take a look later if you want a sanity check? Go isn't my first language but two sets of eyeballs is always nice
yes please!