Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jzillmann/jmh-visualizer
Visually explore your JMH Benchmarks
https://github.com/jzillmann/jmh-visualizer
benchmark chart jmh visualization
Last synced: 4 days ago
JSON representation
Visually explore your JMH Benchmarks
- Host: GitHub
- URL: https://github.com/jzillmann/jmh-visualizer
- Owner: jzillmann
- License: agpl-3.0
- Created: 2016-10-08T20:52:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-14T00:05:14.000Z (over 1 year ago)
- Last Synced: 2024-12-24T20:07:07.529Z (11 days ago)
- Topics: benchmark, chart, jmh, visualization
- Language: JavaScript
- Homepage: https://jmh.morethan.io
- Size: 5.92 MB
- Stars: 303
- Watchers: 15
- Forks: 23
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JMH Visualizer
Visually explore your [JMH](http://openjdk.java.net/projects/code-tools/jmh/) Benchmarks! Online version at http://jmh.morethan.io!
Comes with 2 companion projects:
- [Gradle plugin](https://github.com/jzillmann/gradle-jmh-report)
- [Jenkins plugin](https://github.com/jenkinsci/jmh-report-plugin)## Features
- Serverless architecture - All happens locally in your browser
- Visualize the benchmarks of a [single run](http://jmh.morethan.io?example=single) (one JSON file) grouped by benchmark class
- Vertical bar-chart with score and score error
- Link to the original JSON
- Show individual runs as tooltip
- Compare the benchmarks of [2 runs](http://jmh.morethan.io?example=two) (two JSON files) grouped by benchmark class
- Summary of noteable changes
- Vertical bar-chart from -100% to 100%
- Link to the original JSON
- Show score and error of both runs in tooltip
- Compare the benchmarks of [multiple runs](http://jmh.morethan.io?example=multi) (n JSON files) grouped by benchmark class
- Summary of noteable changes
- Line chart
- Show score and error on hover
- Visualize secondary metrics like '·gc.alloc.rate'
- Focus on subselection of charts with synced axis scales
- Load benchmarks from external url or gists## Major Changes
- **Mar 2021** - 0.9.3 Support [Gists containing multiple files](https://github.com/jzillmann/jmh-visualizer/issues/33)
- **Aug 2018** - 0.9 Couple of [user requested features](https://github.com/jzillmann/jmh-visualizer/milestone/6?closed=1)
- **Jul 2018** - 0.8 Revamp Summary Page + Chart transitions
- **Jan 2018** - 0.7.3 External URL/Gist support
- **Okt 2017** - 0.7 Multi-Run support
- **Aug 2017** - 0.6 Layout change & Summary support
- **Jul 2017** - 0.5 Focussing of benchmarks
- **May 2017** - 0.4 Secondary Metrics support
- **Apr 2017** - 0.3 Error Bars & Params support
- **Nov 2016** - 0.2: Add 2 run compare view
- **Okt 2016** - 0.1: Initial Release## Tips & Tricks
While this app will visualize any valid JMH JSON you throw at it, you can write your benchmarks in a way that make the visualization much more enjoyable...
- Put those benchmarks in a single class which you most likely wanne compare to each other
- On the other hand, don't put to much stuff in a single class/chart (since readability will suffer)
- Don't mix incompatible benchmark styles into one class (like mixing average and single shot is ok, but mixing avarage and throughput doesn't make much sense)
- Sensibly design your package structure, your class name and you methods names, those are reflected in the auto-generated charts
- Keep method names short but meaningful
- The method names reflect initial sort, so if you have benchmarks called 'with1Threads, with10Threads' naming them 'with01Thread, with10Thread' will display nicer## Parameter reference
| Name | Values | What you can do with it? | Example |
| ------------- | ------------- | ------------- | ------------- |
| source | $url | Load a single benchmark result from the provided URL | http://jmh.morethan.io?source=https://gist.githubusercontent.com/jzillmann/7d23b2382911cc434754a23773b06598/raw/1bcad4bb64624d8a2be15114a4eee4c406c3ae95/string-concatenation_jdk7.json |
| sources | $url1,$url2,.. | Load multiple benchmark results from the provided URLs | http://jmh.morethan.io?sources=https://gist.githubusercontent.com/jzillmann/7d23b2382911cc434754a23773b06598/raw/1bcad4bb64624d8a2be15114a4eee4c406c3ae95/string-concatenation_jdk7.json,https://gist.githubusercontent.com/jzillmann/866d39d43b264f507a67368f2313baca/raw/d0ae1502e8c493e6814c83f2df345fecb763c078/string-concatenation_jdk8.json |
| gist | $gistId | Load a single benchmark result from the provided gist | http://jmh.morethan.io?gist=7d23b2382911cc434754a23773b06598 |
| gist (multi-file)| $gistId | Load multiple benchmark results from the provided gist | http://jmh.morethan.io?gist=4c9e282fff30b5fa455ae2496acf4e05 |
| gists | $gistId1,$gistId2,... | Load multiple benchmark results from the provided gists | http://jmh.morethan.io?gists=7d23b2382911cc434754a23773b06598,866d39d43b264f507a67368f2313baca |
| topBar | oneOf['default', 'off, 'my custom headline'] | Control the header | [Off](http://jmh.morethan.io?gist=7d23b2382911cc434754a23773b06598&topBar=off), [Custom Headline](http://jmh.morethan.io/?gist=7d23b2382911cc434754a23773b06598&topBar=Custom%20Headline) |## Contribute
Use the [issue tracker](https://github.com/jzillmann/jmh-visualizer/issues) and/or open [pull requests](https://github.com/jzillmann/jmh-visualizer/pulls)!
#### Useful Commands
- ```npm install``` Download all necessary npm packages
- ```npm run lint``` Lint the javascript files
- ```npm run test``` Run tests
- ```npm run check``` Run Lint & Test
- ```npm run watch``` Continuously build the project
- ```open build/index.html``` Open the build project in your default browser
- ```npm run release``` Build production version
- ```npm run deploy``` Build production version & move it to the github pages fodler#### Docker Build & Run
```bash
docker build . -t jmh-visualizer
docker run --rm -d -p 80:80 --name jmh-visualizer jmh-visualizer
```Now you can access the UI on ```http://localhost```.
#### Realease
- Increase version in package.json
- Update README.md in case of major releases
- ```npm run deploy```
- commit & push
- tag with
- _git tag -a $releaseVersion -m "$releaseVersion release"_
- _git push --tags_## Credits
http://recharts.org/ - The chart ground work
http://www.favicon.cc/ - Created the favicon with
Babel, webpack, react,... and many more for an enjoyable webstack!
## Donating
[![Support via PayPal](https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg)](https://www.paypal.me/JohannesZillmann/5.4)