Skip to content

QuickPerf

Jean Bisutti edited this page Jul 15, 2019 · 101 revisions

QuickPerf is a testing library for Java providing annotations to quickly evaluate some performance properties.

QuickPerf works with a JDK 1.7+.

Execute QuickPerf

With JUnit 4

With Spring

Have clickable links in your IDE

Sometimes, QuickPerf can display a web url or a file url in the console. It is useful to have a plugin in your IDE to open it by a simple click. In IntelliJ, you can for example use Awesome console.

Example of a clickable link with Awasome console

Use QuickPerf annotations

Annotation scopes

An annotation can have three scopes:

  • Global scope
    An annotation having a global scope applies on each test.
    You can define annotations with global scope by creating a class implementing SpecifiableAnnotations interface. This class has to be in org.quickperf package.
  • Test class scope
    An annotation having a test class scope overrides the configuration of the same annotation with global scope.
  • Test method scope
    An annotation having a test method scope overrides the configuration of the same annotation with test class and global scopes.

Example illustrating how annotation scopes work

Core annotations

JVM annotations

Configure your test JVM

Verify heap allocation

Profile or check your JVM

SQL annotations

Easily detect N+1 select, JDBC batching disabled and other things.

Disable QuickPerf

To disable QuickPerf features you can pass -DdisableQuickPerf=true to your JVM or use some core annotations (@DisableQuickPerf, @FunctionalIteration, @DisableGlobalAnnotations).

You can’t perform that action at this time.