GithubHelp home page GithubHelp logo

jenkinsci / jmh-report-plugin Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 9.0 1.31 MB

Visually explore your JMH benchmarks on Jenkins!

Home Page: https://plugins.jenkins.io/jmh-report/

License: Apache License 2.0

Java 98.28% HTML 0.74% JavaScript 0.98%
jmh jenkins benchmark jenkins-plugin jmh-visualizer

jmh-report-plugin's Introduction

Jenkins JMH Report Plugin

Visually explore your JMH benchmarks on Jenkins!

Based on JMH Visualizer.

Given your project runs JMH benchmarks, you can use this plugin to visualize the results of it. The results need to be stored in JSON therefore.

Build Status

Setup in Jenkins

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 like that:

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

As a post-build action

post-build action

As a Job-DSL-Plugin

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')
            }
        }
    }
}

Building the project

  • Setup project for eclipse: mvn -DdownloadSources=true eclipse:eclipse
  • Run a Jenkins instance with the plugin deployed

Releasing the project

  • (Only on jmh-visualizer update) Copy bundle.js (from jmh-visualizer) into src/main/webapp/
  • (Only on major version change) Change version in pom.xml to ${version}-SNAPSHOT
  • Test the Plugin in dev mode: mvn hpi:run
  • Test the Plugin on a Jenkins instance:
    • Build the HPI: mvn hpi:hpi
    • Download and install Jenkins (https://jenkins.io/download/)
    • Start and stop on a Mac with
      • sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
      • sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
    • Upload the HPI (target/jmh-report.hpi) into the local Jenkins instance
  • Commit & Push
  • Release: mvn release:prepare release:perform
  • Update https://wiki.jenkins.io/display/JENKINS/JMH+Report+Plugin

jmh-report-plugin's People

Contributors

abishek3876 avatar jzillmann avatar markewaite avatar sghill avatar sghill-rewrite avatar tira-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jmh-report-plugin's Issues

Support Globbing

Hi.
I'm using this plugin to have the jmh report of my project directly
available/rendered within jenkins. Everything works so far in a single
project.

e.g.

steps {
	bash './gradlew jmh'
}
post {
	always {
		jmhReport 'build/reports/jmh/result.json'
	}
}

But when i have a multi-project, I have to define the result file on each module.
My question is, is "globbing" a missing feature?
Or did I misunderstand the README and the class/method

public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener)
to be able to use globbing/pattern to define more than just one result file.

e.g.

steps {
	bash './gradlew jmh'
}
post {
	always {
		jmhReport '**/build/reports/jmh/result.json'
	}
}

thx
marko

Support Multiproject Reports

Why
I want to use the jmh report plugin on a multi project build.
At the moment, this plugin can handle only one report in a single project. In a multi project env the results will be overwritten by each other.

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.