cargo-criterion
cargo-criterion copied to clipboard
Support open metrics format as output
I'm using GitLab and perform benchmarks on multiple rust tools. GitLab support the openmetrics format so it would be useful if it would be directly supported as a cargo-criterion output format.
https://openmetrics.io https://docs.gitlab.com/ee/ci/testing/metrics_reports.html
As a workaround it is possible to use the following jq
command
jq --raw-output '. | select(.id != null) | {"id": .id | sub("[ /]"; "_"; "g"), "estimate": .mean["estimate"]} | join("_ns ")'
Hello! Thanks for the suggestion.
This does seem like a useful option. I don't think this will be a high priority for me to implement myself, but a pull request would be welcome.