aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/build.gradle
blob: 077ab032b3e4682afca6633c297faf7b514cff33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
description = 'OpenCensus Benchmarks'

buildscript {
    repositories {
        jcenter()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "me.champeau.gradle:jmh-gradle-plugin:0.4.5"
        classpath "gradle.plugin.io.morethan.jmhreport:gradle-jmh-report:0.7.0"
    }
}

apply plugin: "me.champeau.gradle.jmh"
apply plugin: "io.morethan.jmhreport"

jmh {
    jmhVersion = '1.20'
    warmupIterations = 10
    iterations = 10
    fork = 1
    failOnError = true
    resultFormat = 'JSON'
}

dependencies {
    compile project(':opencensus-api'),
            project(':opencensus-impl-core'),
            project(':opencensus-impl-lite'),
            project(':opencensus-impl')
}

compileJmhJava {
    options.compilerArgs = compileJava.options.compilerArgs
}

// Generate html report for findbugsJmh.
findbugsJmh {
    reports {
        xml.enabled = false
        html.enabled = true
    }
}

jmhReport {
    jmhResultPath = project.file("${project.buildDir}/reports/jmh/results.json")
    jmhReportOutput = project.file("${project.buildDir}/reports/jmh")
}

tasks.jmh.finalizedBy tasks.jmhReport

// Disable checkstyle if not java8.
checkstyleJmh.enabled = JavaVersion.current().isJava8Compatible()