jmh


How to make JMH run in less time


We have a lot of JMH tests and when running the tests (using gradle JMH plugin) they are taking a long time. All of our tests are single-threaded.
Can anyone advise how to best parallelise the execution of JMH tests? Our build box has plenty of CPU available.
Output from JMH gradle plugin as we have currently configured it (all defaults)
# JMH 1.12 ...
# VM options: <none>
# Warmup: 20 iterations, 1 s each
# Measurement: 20 iterations, 1 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Throughput, ops/time
Performance tests are not supposed to be run in parallel for stability/reproducibility reasons. JMH would actually complain if you try to run several instances of JMH on the same system.
What you can do is to trim down the execution time if that is proven not to violate test stability. E.g. if you know that after 5 seconds warmup time the workloads stabilize at some score, you can do 5x1s warmup iterations. Ditto for measurement: if you know that less measurement iterations does not affect the errors you get, can trim that down too. The same with the number of forks.
JMH provides both annotations to override the default running mode (see e.g. JMHSample20_Annotations, and the command line options too (run with -h to get the list).

Related Links

How to make JMH run in less time
JMH objects outside a method scope
JMH measurement iterations
JMH - why do I need Blackhole.consumeCPU()
JMH setup and tear down
Benchmark results ForkJoin vs Disruptor?
JMH: Constrain parameter space
JMH: What does the score value mean?
Graphics + Archiving

Categories

HOME
drupal
autohotkey
skype-for-business
model-view-controller
kendo-ui-angular2
pandoc
datetimepicker
servicenow
kendo-asp.net-mvc
clip-path
google-api-oauth
rename
aws-sdk-cpp
osrm
lambda-calculus
minimum
internet-explorer-7
simd
audio-streaming
ampscript
ajaxcontroltoolkit
screen-scraping
datastax-enterprise
setup-project
schedule
drawrect
overflow
node-soap
pymunk
console.readline
framebuffer
ngrok
definition
amazon-rds-aurora
nshttpurlresponse
bootstrap-carousel
servicebus
weld
mef
google-chrome-storage
evaluation
visualizer
dynamic-linking
liferay-ide
codesniffer
acceleo
esprima
vertex-shader
blitz3d
android-music-player
joystick
netlink
qtruby
nsoperationqueue
jde
custom-build-step
video-embedding
sdkman
musicbrainz
azure-mobile-app
joomla3.3
stderr
wingdb
service-broker
pysvn
apache-pivot
worklight-appcenter
fscanf
angular-file-upload
netbeans-plugins
nop
mysql-error-1146
coinbase-php
gmail-imap
database-restore
django-tinymce
metapost
ncml
doxia
databus
jquery-ui-map
visual-leak-detector
flexbuilder
openwrap
gmagick
functional-specifications
marathontesting
lgpl
nscharacterset
google-local-search
webdb
large-data-volumes
pkcs#7
pixel-bender
projectgen
jettison
weak-typing

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile