-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding JMH benchmarks Fixes #9
- Loading branch information
Nathan Mittler
authored
Feb 1, 2017
1 parent
e6bccba
commit f998b64
Showing
10 changed files
with
681 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
plugins { | ||
id 'me.champeau.gradle.jmh' version '0.3.1' | ||
} | ||
|
||
apply plugin: 'idea' | ||
|
||
description = 'Conscrypt: OpenJDK Benchmarks' | ||
|
||
ext { | ||
// The configuration of conscrypt-openjdk to use. This configuration will contain the native artifact for | ||
// the current platform. | ||
openJdkConfiguration = normalizeClassifier(classifierFor(osName, 'x86_64')) | ||
} | ||
|
||
jmh { | ||
jmhVersion = "$jmhVersion" | ||
warmupIterations = 10 | ||
iterations = 10 | ||
fork = 1 | ||
jvmArgs = '-server -Xms2g -Xmx2g' | ||
duplicateClassesStrategy = 'warn' | ||
} | ||
|
||
dependencies { | ||
compile project(path: ':conscrypt-openjdk', configuration: "$openJdkConfiguration"), libraries.guava | ||
jmh libraries.junit, | ||
libraries.netty, | ||
libraries.netty_tcnative, | ||
// JMH plugin doesn't seem to include this dependency by default. This version of the JMH | ||
// plugin seems to require the use of v1.12 for all other JMH dependencies, so not overriding | ||
// them here. | ||
libraries.jmh_generator_annprocess | ||
} | ||
|
||
// Running benchmarks in IntelliJ seems broken without this. | ||
// See https://github.com/melix/jmh-gradle-plugin/issues/39 | ||
idea.module { | ||
scopes.PROVIDED.plus += [ configurations.jmh ] | ||
} | ||
|
||
static classifierFor(osName, archName) { | ||
return "${osName}-${archName}" | ||
} | ||
|
||
static normalizeClassifier(classifier) { | ||
return classifier.replaceAll("-", "_") | ||
} |
Oops, something went wrong.