Make benchmark graph extensible and add more bars #1080
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I want to visualize the results of multiple benchmarks in a graph. However, the subplot layout, along with many magic constants, is almost hard-coded. And as mentioned in the comments of run.sh, it is not possible to add a sufficient number of bar graphs.
I replaced the graph library from matplotlib to plotly and made modifications, to reduce magic constants and to make it easier to expand. I also introduced type hints in the Python code.
The attached image is an example when including all bar graphs. But I don't have a native Linux box, so the benchmark result graph could not be included in the PR. It was executed on WSL.
The first commit only contains format change without altering any code, you can skip it and read the second one.(3b0732b)