diff --git a/microbench/pom.xml b/microbench/pom.xml index 4825ce3b8b..dc9d2c798d 100644 --- a/microbench/pom.xml +++ b/microbench/pom.xml @@ -45,6 +45,11 @@ netty-codec-http ${project.version} + + junit + junit + compile + org.openjdk.jmh jmh-core @@ -70,9 +75,12 @@ org.apache.maven.plugins maven-surefire-plugin + ${project.build.sourceDirectory} + ${project.build.outputDirectory} **/AbstractMicrobenchmark.java **/*$*.class + **/generated/*.class ${project.build.directory}/reports/performance/ diff --git a/microbench/src/test/java/io/netty/handler/codec/CodecOutputListBenchmark.java b/microbench/src/main/java/io/netty/handler/codec/CodecOutputListBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/handler/codec/CodecOutputListBenchmark.java rename to microbench/src/main/java/io/netty/handler/codec/CodecOutputListBenchmark.java diff --git a/microbench/src/test/java/io/netty/handler/codec/package-info.java b/microbench/src/main/java/io/netty/handler/codec/package-info.java similarity index 100% rename from microbench/src/test/java/io/netty/handler/codec/package-info.java rename to microbench/src/main/java/io/netty/handler/codec/package-info.java diff --git a/microbench/src/test/java/io/netty/microbench/buffer/ByteBufAllocatorBenchmark.java b/microbench/src/main/java/io/netty/microbench/buffer/ByteBufAllocatorBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/buffer/ByteBufAllocatorBenchmark.java rename to microbench/src/main/java/io/netty/microbench/buffer/ByteBufAllocatorBenchmark.java diff --git a/microbench/src/test/java/io/netty/microbench/buffer/ByteBufBenchmark.java b/microbench/src/main/java/io/netty/microbench/buffer/ByteBufBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/buffer/ByteBufBenchmark.java rename to microbench/src/main/java/io/netty/microbench/buffer/ByteBufBenchmark.java diff --git a/microbench/src/test/java/io/netty/microbench/buffer/ByteBufUtilBenchmark.java b/microbench/src/main/java/io/netty/microbench/buffer/ByteBufUtilBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/buffer/ByteBufUtilBenchmark.java rename to microbench/src/main/java/io/netty/microbench/buffer/ByteBufUtilBenchmark.java diff --git a/microbench/src/test/java/io/netty/microbench/buffer/HeapByteBufBenchmark.java b/microbench/src/main/java/io/netty/microbench/buffer/HeapByteBufBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/buffer/HeapByteBufBenchmark.java rename to microbench/src/main/java/io/netty/microbench/buffer/HeapByteBufBenchmark.java diff --git a/microbench/src/test/java/io/netty/microbench/buffer/PooledByteBufAllocatorAlignBenchmark.java b/microbench/src/main/java/io/netty/microbench/buffer/PooledByteBufAllocatorAlignBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/buffer/PooledByteBufAllocatorAlignBenchmark.java rename to microbench/src/main/java/io/netty/microbench/buffer/PooledByteBufAllocatorAlignBenchmark.java diff --git a/microbench/src/test/java/io/netty/microbench/buffer/SlicedByteBufBenchmark.java b/microbench/src/main/java/io/netty/microbench/buffer/SlicedByteBufBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/buffer/SlicedByteBufBenchmark.java rename to microbench/src/main/java/io/netty/microbench/buffer/SlicedByteBufBenchmark.java diff --git a/microbench/src/test/java/io/netty/microbench/buffer/SwappedByteBufBenchmark.java b/microbench/src/main/java/io/netty/microbench/buffer/SwappedByteBufBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/buffer/SwappedByteBufBenchmark.java rename to microbench/src/main/java/io/netty/microbench/buffer/SwappedByteBufBenchmark.java diff --git a/microbench/src/main/java/io/netty/microbench/buffer/package-info.java b/microbench/src/main/java/io/netty/microbench/buffer/package-info.java new file mode 100644 index 0000000000..f8189b0b8c --- /dev/null +++ b/microbench/src/main/java/io/netty/microbench/buffer/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright 2017 The Netty Project + * + * The Netty Project 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. + */ +/** + * Benchmarks for {@link io.netty.buffer}. + */ +package io.netty.microbench.buffer; diff --git a/microbench/src/test/java/io/netty/microbench/common/AppendableCharSequenceBenchmark.java b/microbench/src/main/java/io/netty/microbench/common/AppendableCharSequenceBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/common/AppendableCharSequenceBenchmark.java rename to microbench/src/main/java/io/netty/microbench/common/AppendableCharSequenceBenchmark.java diff --git a/microbench/src/main/java/io/netty/microbench/common/package-info.java b/microbench/src/main/java/io/netty/microbench/common/package-info.java new file mode 100644 index 0000000000..32fac4d8ed --- /dev/null +++ b/microbench/src/main/java/io/netty/microbench/common/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright 2017 The Netty Project + * + * The Netty Project 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. + */ +/** + * Benchmarks for {@link io.netty.util}. + */ +package io.netty.microbench.common; diff --git a/microbench/src/test/java/io/netty/microbench/concurrent/FastThreadLocalFastPathBenchmark.java b/microbench/src/main/java/io/netty/microbench/concurrent/FastThreadLocalFastPathBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/concurrent/FastThreadLocalFastPathBenchmark.java rename to microbench/src/main/java/io/netty/microbench/concurrent/FastThreadLocalFastPathBenchmark.java diff --git a/microbench/src/test/java/io/netty/microbench/concurrent/FastThreadLocalSlowPathBenchmark.java b/microbench/src/main/java/io/netty/microbench/concurrent/FastThreadLocalSlowPathBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/concurrent/FastThreadLocalSlowPathBenchmark.java rename to microbench/src/main/java/io/netty/microbench/concurrent/FastThreadLocalSlowPathBenchmark.java diff --git a/microbench/src/main/java/io/netty/microbench/concurrent/package-info.java b/microbench/src/main/java/io/netty/microbench/concurrent/package-info.java new file mode 100644 index 0000000000..823cb63dc6 --- /dev/null +++ b/microbench/src/main/java/io/netty/microbench/concurrent/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright 2017 The Netty Project + * + * The Netty Project 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. + */ +/** + * Benchmarks for {@link io.netty.util.concurrent}. + */ +package io.netty.microbench.concurrent; diff --git a/microbench/src/test/java/io/netty/microbench/http/HttpRequestDecoderBenchmark.java b/microbench/src/main/java/io/netty/microbench/http/HttpRequestDecoderBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/http/HttpRequestDecoderBenchmark.java rename to microbench/src/main/java/io/netty/microbench/http/HttpRequestDecoderBenchmark.java diff --git a/microbench/src/main/java/io/netty/microbench/http/package-info.java b/microbench/src/main/java/io/netty/microbench/http/package-info.java new file mode 100644 index 0000000000..ae666abc60 --- /dev/null +++ b/microbench/src/main/java/io/netty/microbench/http/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright 2017 The Netty Project + * + * The Netty Project 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. + */ +/** + * Benchmarks for {@link io.netty.handler.codec.http}. + */ +package io.netty.microbench.http; diff --git a/microbench/src/test/java/io/netty/microbench/internal/PrivilegedSocketOperationsBenchmark.java b/microbench/src/main/java/io/netty/microbench/internal/PrivilegedSocketOperationsBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/internal/PrivilegedSocketOperationsBenchmark.java rename to microbench/src/main/java/io/netty/microbench/internal/PrivilegedSocketOperationsBenchmark.java diff --git a/microbench/src/test/java/io/netty/microbench/internal/RecyclableArrayListBenchmark.java b/microbench/src/main/java/io/netty/microbench/internal/RecyclableArrayListBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/internal/RecyclableArrayListBenchmark.java rename to microbench/src/main/java/io/netty/microbench/internal/RecyclableArrayListBenchmark.java diff --git a/microbench/src/main/java/io/netty/microbench/internal/package-info.java b/microbench/src/main/java/io/netty/microbench/internal/package-info.java new file mode 100644 index 0000000000..3fec3adc12 --- /dev/null +++ b/microbench/src/main/java/io/netty/microbench/internal/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright 2017 The Netty Project + * + * The Netty Project 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. + */ +/** + * Benchmarks for {@link io.netty.util.internal}. + */ +package io.netty.microbench.internal; diff --git a/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java b/microbench/src/main/java/io/netty/microbench/util/AbstractMicrobenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java rename to microbench/src/main/java/io/netty/microbench/util/AbstractMicrobenchmark.java diff --git a/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmarkBase.java b/microbench/src/main/java/io/netty/microbench/util/AbstractMicrobenchmarkBase.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmarkBase.java rename to microbench/src/main/java/io/netty/microbench/util/AbstractMicrobenchmarkBase.java diff --git a/microbench/src/test/java/io/netty/microbench/util/ResourceLeakDetectorBenchmark.java b/microbench/src/main/java/io/netty/microbench/util/ResourceLeakDetectorBenchmark.java similarity index 100% rename from microbench/src/test/java/io/netty/microbench/util/ResourceLeakDetectorBenchmark.java rename to microbench/src/main/java/io/netty/microbench/util/ResourceLeakDetectorBenchmark.java diff --git a/microbench/src/main/java/io/netty/microbench/util/package-info.java b/microbench/src/main/java/io/netty/microbench/util/package-info.java new file mode 100644 index 0000000000..5e1374cc39 --- /dev/null +++ b/microbench/src/main/java/io/netty/microbench/util/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright 2017 The Netty Project + * + * The Netty Project 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. + */ +/** + * Benchmarks for {@link io.netty.util}. + */ +package io.netty.microbench.util; diff --git a/microbench/src/test/resources/logback.xml b/microbench/src/main/resources/logback.xml similarity index 100% rename from microbench/src/test/resources/logback.xml rename to microbench/src/main/resources/logback.xml