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 bytes sent in human readable format #35

Open
MrBruz opened this issue May 21, 2022 · 4 comments
Open

Print bytes sent in human readable format #35

MrBruz opened this issue May 21, 2022 · 4 comments
Labels
Milestone

Comments

@MrBruz
Copy link

MrBruz commented May 21, 2022

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.

@yunginnanet yunginnanet added this to the v0.4 milestone Feb 10, 2023
@ginger51011
Copy link
Collaborator

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.

@yunginnanet
Copy link
Owner

yunginnanet commented Jan 19, 2024

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

@ginger51011
Copy link
Collaborator

ginger51011 commented Jan 19, 2024

@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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants