From aa90297f3b0c3fd9bf8b6cd9d09e46713eeb5283 Mon Sep 17 00:00:00 2001 From: jchrys Date: Wed, 27 Mar 2024 20:19:23 +0900 Subject: [PATCH] remove invalid benchmark Motivation: `MySqlNames` is removed by #257 but related bench is not removed properly. Modifications: Removed MySqlNames bench Result: Clean up --- .../mysql/MySqlNamesCompareBenchmark.java | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 r2dbc-mysql/src/jmh/java/io/asyncer/r2dbc/mysql/MySqlNamesCompareBenchmark.java diff --git a/r2dbc-mysql/src/jmh/java/io/asyncer/r2dbc/mysql/MySqlNamesCompareBenchmark.java b/r2dbc-mysql/src/jmh/java/io/asyncer/r2dbc/mysql/MySqlNamesCompareBenchmark.java deleted file mode 100644 index 351e47951..000000000 --- a/r2dbc-mysql/src/jmh/java/io/asyncer/r2dbc/mysql/MySqlNamesCompareBenchmark.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2023 asyncer.io projects - * - * Licensed 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 - * - * https://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 io.asyncer.r2dbc.mysql; - -import org.junit.platform.commons.annotation.Testable; -import org.openjdk.jmh.annotations.Benchmark; -import org.openjdk.jmh.annotations.Scope; -import org.openjdk.jmh.annotations.State; -import org.openjdk.jmh.annotations.Threads; -import org.openjdk.jmh.annotations.Timeout; - -/** - * Benchmark between {@link MySqlNames#compare} and {@link String#compareToIgnoreCase}. - */ -@State(Scope.Benchmark) -@Threads(1) -@Timeout(time = 1) -@Testable -public class MySqlNamesCompareBenchmark extends BenchmarkSupport { - - private static final String LEFT = "This is a test message for testing String compare " + - "with case insensitive or case sensitive"; - - private static final String RIGHT = LEFT.toUpperCase(); - - @Benchmark - @Testable - public int compareCi() { - return MySqlNames.compare(LEFT, RIGHT); - } - - @Benchmark - @Testable - public int nativeCompareCi() { - return String.CASE_INSENSITIVE_ORDER.compare(LEFT, RIGHT); - } - - @Benchmark - @Testable - public int compareCs() { - return MySqlNames.compare(LEFT, LEFT); - } - - @SuppressWarnings("EqualsWithItself") - @Benchmark - @Testable - public int nativeCompareCs() { - return String.CASE_INSENSITIVE_ORDER.compare(LEFT, LEFT); - } -}