Visually explore your JMH benchmarks on Jenkins!

{jenkins-plugin-info:pluginId=jmh-report|sourceDir=jmh-report-plugin}


Features

Changelog

Version Archive


The plugin makes use of jmh-visualizer project. The version number correspond to its releases. So jmh-report-plugin 0.4.2 makes use of jmh-visualizer 0.4.2.

Requirements

How to's

Setup in pipeline project

You can setup jmh-report as a pipeline step:

jmhReport 'build/reports/jmh/result.json'

OR

step([$class: 'RunPublisher', resultPath: 'build/reports/jmh/result.json'])


A complete pipeline could look as simple as that:

node {
    checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/ben-manes/caffeine.git']]])
    sh './gradlew jmh -PincludePattern=".*DelegationBenchmark.*"'
    jmhReport 'caffeine/build/reports/jmh/results.json'
}


Setup with Job DSL


jmhReport { resultPath('build/reports/jmh/result.json') }


A complete job-dsl example could look like that:

job('example-1') {
    steps {
        scm {
            git("https://github.com/ben-manes/caffeine.git", "master")
        }
        shell('./gradlew jmh -PincludePattern=".*DelegationBenchmark.*"')
        publishers {
            jmhReport {
                resultPath('build/reports/jmh/result.json')
            }
        }
    }
}



Setup in regular project

You can setup jmh-report - i.e. in a freestyle project - by adding it as a post-build action.