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

add support for OpenMetrics message format

Open aparcar opened this issue 2 years ago • 1 comments

This commit adds support for the OpenMetrics message format1 which is equivalent to the message format of Prometheus. Its advantage is to be easily human readable as well as consumable by time series databases.

Lastly it's possible to display results directly within the GitLab CI.

It's now possible to pass 'openmetrics' as a message format, an example is shown below:

criterion_benchmark_result_ns{id="address_scan",confidence="estimate",input_size="4",aggregation="slope"} 33811.02693018697
criterion_benchmark_result_ns{id="address_scan",confidence="upper_bound",input_size="4",aggregation="slope"} 35170.884432780265
criterion_benchmark_result_ns{id="address_scan",confidence="lower_bound",input_size="4",aggregation="slope"} 32402.287415202973
criterion_benchmark_info{id="address_scan",input_size="4",report_directory="/path/criterion/reports/address_scan/4"} 1

Closes: #54

Signed-off-by: Kevin Becker [email protected] Signed-off-by: Paul Spooren [email protected]

aparcar avatar Jul 19 '22 12:07 aparcar

@bheisler please approve the CI

aparcar avatar Jul 25 '22 06:07 aparcar

Friendly ping

aparcar avatar Aug 16 '22 12:08 aparcar

Thanks for the pull request, and the patience! Those errors look unrelated to your changes, so I'll try and fix them and re-run the checks.

bheisler avatar Aug 16 '22 22:08 bheisler

OK, this looks good. Thanks for the pull request!

bheisler avatar Aug 16 '22 22:08 bheisler