GithubHelp home page GithubHelp logo

korektur / idea-jmh-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from artyushov/idea-jmh-plugin

0.0 2.0 0.0 49 KB

Plugin for Itellij IDEA to make benchmarking with JMH easier.

License: MIT License

Java 100.00%

idea-jmh-plugin's Introduction

idea-jmh-plugin

Why do I need this?

This is a plugin that allows you to use JMH in the same way as JUnit. Here are the features that are already implemented:

  1. @Benchmark method generation
  2. Running a separate @Benchmark method
  3. Running all the benchmarks in a class

How do I use this?

First of all, you must have jmh-core and jmh-generator-annprocess on the classpath of your module.

After that install the plugin. You can do this directly from IDEA โ€” search for JMH in plugin repositories.

Then you can use the plugin the same way you use JUnit. To generate a new benchmark method run Generate... action. In Mac OS it is Ctrl + N Or just right click in your editor pane and select Generate micro benchmark.

To run a separate benchmark method move the cursor to the method declaration and invoke Run action. In Mac OS it is Ctrl + Shift + F10. Do the same actions to run all the benchmarks in a class, just move your cursor to the class declaration.

Invoking Run actions will create a new configuration with default parameters JMH provides. If you want to change these parameters just edit this configuration. By now it's not possible to set default parameters for all configurations.

Please, note that when running a benchmark Annotation processing is automatically enabled in your IDE.

Doesn't it affect the quality of my benchmarks?

A brief research shows that benchmark results are affected, but not that much. The whole research is described in Research results. Long story short, the maximum means difference observed was 2.2%.

idea-jmh-plugin's People

Contributors

artyushov avatar sparkoo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.