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

Machine readable output option #4

Open
seagreen opened this issue Mar 11, 2019 · 4 comments
Open

Machine readable output option #4

seagreen opened this issue Mar 11, 2019 · 4 comments

Comments

@seagreen
Copy link

I may have missed it, but if not it would be good to have some kind of machine readable output format (JSON / TSV / etc).

@seagreen
Copy link
Author

If you think this is a good idea I can make a PR for it.

@knupfer
Copy link
Owner

knupfer commented Mar 14, 2019

I think it would be a great idea and I'd love to get some contributions. Go for it!

@seagreen
Copy link
Author

Good news: we already have aeson as a transitive dependency because of chronos, so it will be easy to output JSON.

I do have a question about how we want things to work.

Two options:

  1. A --json flag that acts like --print-once but prints as JSON instead of the current output bars.

  2. We switch the current output to be done over STDERR instead of STDOUT. This would be a big change, but makes sense (maybe?) because it's for human consumption, and can't be piped into other tools.

    Then we add a --json flag that prints results as JSON on STDOUT at the end of a run.

    This would be nice because when you use --json you can still watch the output bars to see how the benchmark is progressing like you can right now, and then ctrl+C when you're ready to get a JSON report.

What are your thoughts? I prefer the second, but that may just be because I haven't realized some downside to it yet, it would certainly be a big change.

@seagreen
Copy link
Author

After talking with a friend about it, I changed my mind and like the simplicity of the current way of doing things, where everything is emitted on STDOUT.

That means we'll probably want the --json flag to prevent showing of the charts.

I've made a tentative PR for us to look at here: #6

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

No branches or pull requests

2 participants