You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by am...@apache.org on 2021/01/12 11:21:40 UTC

[ignite-3] 03/03: Minor.

This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a commit to branch ignite-13618
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit 931940433391f65f2a24883a4529d7f9cc79c79f
Author: Andrew Mashenkov <an...@gmail.com>
AuthorDate: Tue Jan 12 14:21:11 2021 +0300

    Minor.
---
 modules/commons/pom.xml                                 | 15 +++++++--------
 .../marshaller/generator/MarshallerCodeGenerator.java   | 17 +++++++++++++++++
 .../marshaller/generator/SerializerGenerator.java       |  1 -
 .../internal/benchmarks/SerializerBenchmarkTest.java    | 10 +++++-----
 pom.xml                                                 |  2 +-
 5 files changed, 30 insertions(+), 15 deletions(-)

diff --git a/modules/commons/pom.xml b/modules/commons/pom.xml
index a5b64e8..f0e00db 100644
--- a/modules/commons/pom.xml
+++ b/modules/commons/pom.xml
@@ -51,6 +51,12 @@
         <!-- Test dependencies -->
         <dependency>
             <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <version>${junit.jupiter.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
             <artifactId>junit-jupiter-params</artifactId>
             <version>${junit.jupiter.version}</version>
             <scope>test</scope>
@@ -66,20 +72,13 @@
         <dependency>
             <groupId>org.openjdk.jmh</groupId>
             <artifactId>jmh-core</artifactId>
-            <version>${jmh.framework.verion}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.openjdk.jmh</groupId>
-            <artifactId>jmh-generator-annprocess</artifactId>
-            <version>${jmh.framework.verion}</version>
+            <version>${jmh.framework.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>javax.annotation</groupId>
             <artifactId>javax.annotation-api</artifactId>
             <version>${javax.annotation.api.version}</version>
-            <scope>test</scope>
         </dependency>
     </dependencies>
 </project>
diff --git a/modules/commons/src/main/java/org/apache/ignite/internal/schema/marshaller/generator/MarshallerCodeGenerator.java b/modules/commons/src/main/java/org/apache/ignite/internal/schema/marshaller/generator/MarshallerCodeGenerator.java
index bca3256..73615c2 100644
--- a/modules/commons/src/main/java/org/apache/ignite/internal/schema/marshaller/generator/MarshallerCodeGenerator.java
+++ b/modules/commons/src/main/java/org/apache/ignite/internal/schema/marshaller/generator/MarshallerCodeGenerator.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.ignite.internal.schema.marshaller.generator;
 
 import com.squareup.javapoet.CodeBlock;
diff --git a/modules/commons/src/main/java/org/apache/ignite/internal/schema/marshaller/generator/SerializerGenerator.java b/modules/commons/src/main/java/org/apache/ignite/internal/schema/marshaller/generator/SerializerGenerator.java
index 244e659..33b8729 100644
--- a/modules/commons/src/main/java/org/apache/ignite/internal/schema/marshaller/generator/SerializerGenerator.java
+++ b/modules/commons/src/main/java/org/apache/ignite/internal/schema/marshaller/generator/SerializerGenerator.java
@@ -28,7 +28,6 @@ import com.squareup.javapoet.TypeSpec;
 import java.lang.invoke.MethodHandles;
 import java.lang.reflect.InvocationTargetException;
 import java.util.Objects;
-import java.util.concurrent.TimeUnit;
 import javax.annotation.processing.Generated;
 import javax.lang.model.element.Modifier;
 import jdk.jfr.Experimental;
diff --git a/modules/commons/src/test/java/org/apache/ignite/internal/benchmarks/SerializerBenchmarkTest.java b/modules/commons/src/test/java/org/apache/ignite/internal/benchmarks/SerializerBenchmarkTest.java
index d92825a..160ad4a 100644
--- a/modules/commons/src/test/java/org/apache/ignite/internal/benchmarks/SerializerBenchmarkTest.java
+++ b/modules/commons/src/test/java/org/apache/ignite/internal/benchmarks/SerializerBenchmarkTest.java
@@ -55,8 +55,8 @@ import static org.apache.ignite.internal.schema.NativeType.LONG;
  * Serializer benchmark.
  */
 @State(Scope.Benchmark)
-@Warmup(time = 10, iterations = 3, timeUnit = TimeUnit.SECONDS)
-@Measurement(time = 10, iterations = 5, timeUnit = TimeUnit.SECONDS)
+@Warmup(time = 30, timeUnit = TimeUnit.SECONDS)
+@Measurement(time = 60, timeUnit = TimeUnit.SECONDS)
 @BenchmarkMode({Mode.Throughput, Mode.AverageTime})
 @OutputTimeUnit(TimeUnit.MICROSECONDS)
 @Fork(jvmArgs = "-Djava.lang.invoke.stringConcat=BC_SB" /* Workaround for Java 9+ */, value = 1)
@@ -71,7 +71,7 @@ public class SerializerBenchmarkTest {
     private Factory<?> objectFactory;
 
     /** Object fields count. */
-    @Param({/*"0", "1", */"10", "100"})
+    @Param({"0", "1", "10", "100"})
     public int fieldsCount;
 
     /** Serializer. */
@@ -90,10 +90,10 @@ public class SerializerBenchmarkTest {
     }
 
     /**
-     * @throws Exception If failed.
+     *
      */
     @Setup
-    public void init() throws Exception {
+    public void init() {
         Thread.currentThread().setContextClassLoader(CompilerUtils.dynamicClassLoader());
 
         long seed = System.currentTimeMillis();
diff --git a/pom.xml b/pom.xml
index 9e41870..566560d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,7 +47,7 @@
         <javapoet.version>1.13.0</javapoet.version>
         <javax.annotation.api.version>1.3.2</javax.annotation.api.version>
         <jetbrains.annotations.version>20.1.0</jetbrains.annotations.version>
-        <jmh.framework.verion>1.9.3</jmh.framework.verion>
+        <jmh.framework.version>1.9.3</jmh.framework.version>
         <junit.jupiter.version>5.7.0</junit.jupiter.version>
         <mockito.core.version>3.6.28</mockito.core.version>