-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Format of reports when they’re piped into a file: Control characters & JSON #474
Labels
Comments
Sorry for the wait! I've been quite slow in catching up with my GH notifications. Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
I'd like to assign myself this issue if that's okay |
go for it! |
did this change go in? |
This was referenced Mar 12, 2024
This should be closed now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all, thanks for autocannon. I’m starting to use it and liking it 😁
I’ve noticed two formatting issues when piping the output of autocannon into a file.
Issue 1
autocannon prints the control characters that would have made a terminal use different colors. For example:
$ npx autocannon --json http://127.0.0.1:4000/ > output.txt 2>&1
output.txt
I suppose that autocannon could detect that it isn’t printing to the terminal and omit the control characters.
Issue 2
The documentation says that the
--json
option “will cause the progress bar and results not to be rendered.” But that doesn’t seem to be the case for me—I’m getting the results and some JSON at the end. For example:$ npx autocannon --json http://127.0.0.1:4000/ > output.txt 2>&1
output.txt
The text was updated successfully, but these errors were encountered: