google / benchmark

A microbenchmark support library
Apache License 2.0
8.61k stars 1.57k forks source link

feat: benchmark_list_tests benchmark-format=json #1647

Open varshneydevansh opened 11 months ago

varshneydevansh commented 11 months ago

The basics

The details

Resolves

Proposed Changes

To output the benchmark list in JSON format.

Behavior Before Change

Unable to get the desired output for the automation purpose in the JSN format.

Behavior After Change

Added the support for the use of --benchmark_list_tests together with --benchmark-format=json.

Reason for Changes

With this change, the user will be able to get the benchmark output easily in JSON format for better machine use cases.

Test Coverage

I haven't tested this, as soon as I got confirmation that these are the required changes that will update the status of the Test Coverage.

Documentation

Documentation needs to be done for this as it's a feature request once this will pass all the test cases I will add the required document for this.

Additional Information

varshneydevansh commented 11 months ago

Now we have to add the test cases for this enhancement and also have to modify the console menu for this change.

https://github.com/google/benchmark/blob/1c64a36c5b8ee75d462b3fe7a9d020c66a2a1094/src/benchmark.cc#L729

and also the documentation =)


or maybe we just need to modify the documentations and the test cases?

varshneydevansh commented 9 months ago

Apologies, @dmah42 I am currently writing a book on ADHD and I didn't evaluate that it will take this much of time. I am trying to complete it soon and will work on the remaining issues. =)