Proposed patch: update kotlin jmh benchmarks maven archetype
Ilya Gorbunov
ilya.gorbunov at jetbrains.com
Thu Jul 14 19:04:27 UTC 2016
12.07.2016 23:34, Aleksey Shipilev пишет:
> Terribly sorry, but the patch was apparently scrubbed. Can you send the
> patch inline and/or with .patch/.txt extension and/or appropriate MIME type?
>
> Thanks,
> -Aleksey
>
Ok, resending the patch inline:
# HG changeset patch
# User Ilya Gorbunov <ilya.gorbunov at jetbrains.com>
# Date 1463627690 -10800
# Node ID b98f6ce505b3763317a246e4276825c6a3ad1706
# Parent ccd7a1d6f9d041346618b2d75b441433002fea54
jmh-kotlin-benchmark-archetype: rename MyBenchmark.ktm file to .kt,
update dependency on Kotlin compiler and stdlib.
diff --git
a/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
b/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
---
a/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++
b/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -30,7 +30,7 @@
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/kotlin</directory>
<includes>
- <include>**/*.ktm</include>
+ <include>**/*.kt</include>
</includes>
</fileSet>
</fileSets>
diff --git
a/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/pom.xml
b/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/pom.xml
---
a/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/pom.xml
+++
b/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/pom.xml
@@ -50,10 +50,11 @@
<artifactId>jmh-core</artifactId>
<version>\${jmh.version}</version>
</dependency>
- <!--
- Put the dependency on Kotlin stdlib here:
- org.jetbrains.kotlin:kotlin-stdlib:0.6.2517 is one of the
choices
- -->
+ <dependency>
+ <groupId>org.jetbrains.kotlin</groupId>
+ <artifactId>kotlin-stdlib</artifactId>
+ <version>\${kotlin.version}</version>
+ </dependency>
</dependencies>
<prerequisites>
@@ -65,6 +66,12 @@
<jmh.version>${project.version}</jmh.version>
<jmh.generator>default</jmh.generator> <!-- or "asm", or
"reflection" -->
<javac.target>1.6</javac.target>
+ <!--
+ Put an approriate Kotlin compiler and stdlib version here.
+ Available versions are listed here:
+ http://kotlinlang.org/docs/reference/using-maven.html#plugin-and-versions
+ -->
+ <kotlin.version>1.0.2</kotlin.version>
<uberjar.name>benchmarks</uberjar.name>
</properties>
@@ -77,10 +84,7 @@
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
- <!--
- Put an approriate Kotlin compiler version here.
- -->
- <version>PUT_THE_VERSION_HERE</version>
+ <version>\${kotlin.version}</version>
<executions>
<execution>
diff --git
a/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/src/main/kotlin/MyBenchmark.ktm
b/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/src/main/kotlin/MyBenchmark.kt
rename from
jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/src/main/kotlin/MyBenchmark.ktm
rename to
jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/src/main/kotlin/MyBenchmark.kt
---
a/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/src/main/kotlin/MyBenchmark.ktm
+++
b/jmh-archetypes/jmh-kotlin-benchmark-archetype/src/main/resources/archetype-resources/src/main/kotlin/MyBenchmark.kt
@@ -35,7 +35,7 @@
open class MyBenchmark {
- [Benchmark]
+ @Benchmark
fun testMethod() {
// This is a demo/sample template for building your JMH
benchmarks. Edit as needed.
// Put your benchmark code here.
More information about the jmh-dev
mailing list