HellPot icon indicating copy to clipboard operation
HellPot copied to clipboard

Print bytes sent in human readable format

Open MrBruz opened this issue 2 years ago • 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.

MrBruz avatar May 21 '22 02:05 MrBruz

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.

ginger51011 avatar Jan 18 '24 21:01 ginger51011

btw see here: https://github.com/yunginnanet/Rate5/blob/6fda3907504eb711cd0ab1c8c0c9f398d9008b42/speedometer/speedometer.go

and here: https://github.com/yunginnanet/Rate5/pull/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 avatar Jan 19 '24 11:01 yunginnanet

@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

ginger51011 avatar Jan 19 '24 11:01 ginger51011

@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!

yunginnanet avatar Jan 19 '24 21:01 yunginnanet