Skip to content

atychyna/caliper-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installing

Checkout source code.

git clone git://github.com/atychyna/caliper-maven-plugin.git

Install it.

mvn clean install

Add following XML to your $HOME/.m2/settings.xml if you want to be able to use shortened commands like mvn caliper:run.

<pluginGroups>
    <pluginGroup>org.atychyna</pluginGroup>
<pluginGroups>

#Using

You need to have Caliper declared as a dependency in runtime or compile scope of your project (plugin's dependencyResolution = COMPILE_PLUS_RUNTIME).

To run all benchmarks (all classes that begin or end with Benchmark).

mvn compile caliper:run

To run single benchmark.

mvn -Dbenchmark=**/SpecificBenchmark* compile caliper:run

You can also run your benchmarks as a part of a build. By default plugin binds to VERIFY lifecycle phase.

<build>
    <plugins>
        <plugin>
            <groupId>org.atychyna</groupId>
            <artifactId>caliper-maven-plugin</artifactId>
            <version>1.0-SNAPSHOT</version>
            <executions>
                <execution>
                    <id>run</id>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                    <!-- see possible configuration options below -->
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Configurations options

All configuration options (except properties and params) have command line counterparts in form of mvn -D<name>=<value> for strings and mvn -D<name> for booleans.

benchmarkClassesDirectory

  • type: String
  • default: ${project.build.outputDirectory}

Where to look for compiled benchmark classes.

timeLimit

  • type: String
  • default: 30s

Maximum length of time allowed for a single trial. Use 0 to allow trials to run indefinitely.

dryRun

  • type: boolean
  • default: false

Instead of measuring, execute a single rep for each scenario.

failBuild

  • type: boolean
  • default: false

Fail build if benchmark throws an exception.

trials

  • type: Integer
  • default: 1

Number of independent trials to peform per benchmark scenario.

instruments

  • type: List<String>
  • default: Caliper's default

List of measuring instruments to use.

runName

  • type: String

A user-friendly string used to identify the run.

verbose

  • type: boolean
  • default: false

In addition to normal console output, display a raw feed of very detailed information.

caliperConfigFile

  • type: String
  • default: $HOME/.caliper/config.properties

Location of Caliper's configuration file.

caliperDirectory

  • type: String
  • default: $HOME/.caliper

Location of Caliper's configuration and data directory.

printConfig

  • type: boolean
  • default: false

Print the effective configuration that will be used by Caliper.

allocationAgentJar

  • type: String

Java agent for allocation instrument. Plugin will look for agent on a classpath if not defined.

vms

  • type: List<String>
  • default: Caliper's default

List of VMs to test on.

<!-- example:
if ~/.caliper/config.properties contains:

vm.jdk6.home=/path/to/jdk6
vm.jdk7.home=/path/to/jdk7
 -->
<vms>
    <vm>jdk6</vm>
    <vm>jdk7</vm>
</vms>

properties

  • type: List<String>

Specifies a value for any property that could otherwise be specified in $HOME/.caliper/config.properties.

<properties>
    <vm.jdk6.home>/path/to/jdk6</vm.jdk6.home>
    <vm.jdk7.home>/path/to/jdk7</vm.jdk7.home>
</properties>

params

  • type: List<String>

Specifies the values to inject into the 'param' field of the benchmark.

<params>
    <length>1,2,3</length>
    <width>2</width>
</params>

includes

  • type: List<String>

Benchmarks to include in this run. By default all classes that begin or end with Benchmark are included.

<includes>
    <include>**/Bench*</include>
</includes>

excludes

  • type: List<String>

Benchmarks to exclude from this run.

<excludes>
    <exclude>**/DoNotRun*</exclude>
</excludes>

About

Maven plugin for Google Caliper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published