cargo-criterion icon indicating copy to clipboard operation
cargo-criterion copied to clipboard

Support open metrics format as output

Open aparcar opened this issue 2 years ago • 2 comments

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

aparcar avatar Jul 13 '22 12:07 aparcar

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 ")'

aparcar avatar Jul 13 '22 13:07 aparcar

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.

bheisler avatar Jul 14 '22 22:07 bheisler