forked from micronaut-projects/micronaut-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
2,004 additions
and
290 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,21 @@ | ||
plugins { | ||
id "me.champeau.gradle.jmh" version "0.4.8" | ||
} | ||
|
||
dependencies { | ||
annotationProcessor project(":inject-java") | ||
annotationProcessor project(":validation") | ||
compile project(":inject") | ||
compile project(":validation") | ||
compile project(":runtime") | ||
|
||
|
||
jmh 'org.openjdk.jmh:jmh-core:1.21' | ||
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.21' | ||
} | ||
jmh { | ||
duplicateClassesStrategy = 'warn' | ||
warmupIterations = 2 | ||
iterations = 4 | ||
fork = 1 | ||
} |
4 changes: 4 additions & 0 deletions
4
benchmarks/src/jmh/java/io/micronaut/core/annotation/AnnotationValueBenchmark.java
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,4 @@ | ||
package io.micronaut.core.annotation; | ||
|
||
public class AnnotationValueBenchmark { | ||
} |
45 changes: 45 additions & 0 deletions
45
benchmarks/src/jmh/java/io/micronaut/core/convert/ConversionServiceBenchmark.java
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,45 @@ | ||
package io.micronaut.core.convert; | ||
|
||
import org.openjdk.jmh.annotations.Benchmark; | ||
import org.openjdk.jmh.annotations.Scope; | ||
import org.openjdk.jmh.annotations.Setup; | ||
import org.openjdk.jmh.annotations.State; | ||
import org.openjdk.jmh.runner.Runner; | ||
import org.openjdk.jmh.runner.RunnerException; | ||
import org.openjdk.jmh.runner.options.Options; | ||
import org.openjdk.jmh.runner.options.OptionsBuilder; | ||
|
||
import java.net.URI; | ||
|
||
@State(Scope.Benchmark) | ||
public class ConversionServiceBenchmark { | ||
|
||
ConversionService conversionService; | ||
|
||
@Setup | ||
public void prepare() { | ||
conversionService = ConversionService.SHARED; | ||
} | ||
|
||
@Benchmark | ||
public void convertCacheHit() { | ||
conversionService.convert("10", Integer.class); | ||
} | ||
|
||
@Benchmark | ||
public void convertCacheMiss() { | ||
conversionService.convert(URI.create("http://test.com"), Integer.class); | ||
} | ||
|
||
public static void main(String[] args) throws RunnerException { | ||
Options opt = new OptionsBuilder() | ||
.include(".*" + ConversionServiceBenchmark.class.getSimpleName() + ".*") | ||
.warmupIterations(3) | ||
.measurementIterations(5) | ||
.forks(1) | ||
// .jvmArgs("-agentpath:/Applications/YourKit-Java-Profiler-2018.04.app/Contents/Resources/bin/mac/libyjpagent.jnilib") | ||
.build(); | ||
|
||
new Runner(opt).run(); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
base=1.1.3.BUILD-SNAPSHOT | ||
configuration=1.1.2 | ||
service=1.1.2 | ||
kafka=1.1.2 | ||
grpc=1.1.2 | ||
cli=1.1.2 | ||
profile=1.1.2 | ||
federation=1.1.2 | ||
function=1.1.2 | ||
function-aws=1.1.2 | ||
function-aws-alexa=1.1.2 | ||
rabbitmq=1.1.2 | ||
base=1.1.3 | ||
configuration=1.1.3 | ||
service=1.1.3 | ||
kafka=1.1.3 | ||
grpc=1.1.3 | ||
cli=1.1.3 | ||
profile=1.1.3 | ||
federation=1.1.3 | ||
function=1.1.3 | ||
function-aws=1.1.3 | ||
function-aws-alexa=1.1.3 | ||
rabbitmq=1.1.3 |
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
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
9 changes: 9 additions & 0 deletions
9
cli/src/main/groovy/io/micronaut/cli/profile/ResetableCommand.groovy
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,9 @@ | ||
package io.micronaut.cli.profile; | ||
|
||
interface ResetableCommand extends Command { | ||
|
||
/** | ||
* Resets the command state | ||
*/ | ||
void reset() | ||
} |
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
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
Oops, something went wrong.