From b90a4e08e8e902ab49a6f978a29dad62f1594b51 Mon Sep 17 00:00:00 2001 From: Ahoo Wang Date: Wed, 25 Aug 2021 23:54:29 +0800 Subject: [PATCH] - Upgrade to CoSky 1.3.1 - Upgrade to Spring-Boot 2.4.10 --- README.md | 14 +++++----- build.gradle.kts | 4 +-- .../me/ahoo/cosid/redis/RedisIdFactory.java | 2 +- .../redis/RedisIdSegmentDistributor.java | 16 +++++------ .../redis/RedisMachineIdDistributor.java | 27 +++++++++---------- .../RedisIdIdSegmentDistributorTest.java | 10 +++---- .../redis/RedisMachineIdDistributorTest.java | 2 +- .../CosIdRedisSegmentAutoConfiguration.java | 2 +- ...MachineIdDistributorAutoConfiguration.java | 2 +- gradle.properties | 2 +- wiki/getting-started.md | 14 +++++----- 11 files changed, 45 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 1ecdea17ee..8787822883 100644 --- a/README.md +++ b/README.md @@ -385,7 +385,7 @@ public interface OrderRepository { > Kotlin DSL ``` kotlin - val cosidVersion = "1.3.13"; + val cosidVersion = "1.3.14"; implementation("me.ahoo.cosid:cosid-spring-boot-starter:${cosidVersion}") ``` @@ -401,7 +401,7 @@ public interface OrderRepository { 4.0.0 demo - 1.3.13 + 1.3.14 @@ -491,7 +491,7 @@ cosid: ``` shell gradle cosid-core:jmh # or -java -jar cosid-core/build/libs/cosid-core-1.3.13-jmh.jar -bm thrpt -wi 1 -rf json -f 1 +java -jar cosid-core/build/libs/cosid-core-1.3.14-jmh.jar -bm thrpt -wi 1 -rf json -f 1 ``` ``` @@ -512,7 +512,7 @@ SnowflakeIdBenchmark.secondSnowflakeId_generate thrpt 4206843. ``` shell gradle cosid-redis:jmh # or -java -jar cosid-redis/build/libs/cosid-redis-1.3.13-jmh.jar -bm thrpt -wi 1 -rf json -f 1 RedisChainIdBenchmark +java -jar cosid-redis/build/libs/cosid-redis-1.3.14-jmh.jar -bm thrpt -wi 1 -rf json -f 1 RedisChainIdBenchmark ``` ``` @@ -530,7 +530,7 @@ RedisChainIdBenchmark.step_1000 thrpt 5 127439148.104 ± 1833743 ![RedisChainIdBenchmark-Sample](./docs/jmh/RedisChainIdBenchmark-Sample.png) ```shell -java -jar cosid-redis/build/libs/cosid-redis-1.3.13-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000 +java -jar cosid-redis/build/libs/cosid-redis-1.3.14-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000 ``` ``` @@ -555,7 +555,7 @@ RedisChainIdBenchmark.step_1000:step_1000·p1.00 sample 37.440 ``` shell gradle cosid-jdbc:jmh # or -java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.13-jmh.jar -bm thrpt -wi 1 -rf json -f 1 MySqlChainIdBenchmark +java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.14-jmh.jar -bm thrpt -wi 1 -rf json -f 1 MySqlChainIdBenchmark ``` ``` @@ -571,7 +571,7 @@ MySqlChainIdBenchmark.step_1000 thrpt 5 123131804.260 ± 1488004. ![MySqlChainIdBenchmark-Sample](./docs/jmh/MySqlChainIdBenchmark-Sample.png) ```shell -java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.13-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000 +java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.14-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000 ``` ``` Benchmark Mode Cnt Score Error Units diff --git a/build.gradle.kts b/build.gradle.kts index 8500987163..11830d8cce 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,14 +33,14 @@ val libraryProjects = publishProjects - bomProjects ext { set("lombokVersion", "1.18.20") set("guavaVersion", "30.0-jre") - set("springBootVersion", "2.4.7") + set("springBootVersion", "2.4.10") set("springCloudVersion", "2020.0.3") set("springfoxVersion", "3.0.0") set("jmhVersion", "1.29") set("junitPioneerVersion", "1.4.2") set("mybatisVersion", "3.5.7") set("mybatisBootVersion","2.1.4") - set("coskyVersion", "1.2.10") + set("coskyVersion", "1.3.1") set("libraryProjects", libraryProjects) } diff --git a/cosid-redis/src/jmh/java/me/ahoo/cosid/redis/RedisIdFactory.java b/cosid-redis/src/jmh/java/me/ahoo/cosid/redis/RedisIdFactory.java index 09665b3b95..c640e429c4 100644 --- a/cosid-redis/src/jmh/java/me/ahoo/cosid/redis/RedisIdFactory.java +++ b/cosid-redis/src/jmh/java/me/ahoo/cosid/redis/RedisIdFactory.java @@ -44,7 +44,7 @@ public synchronized RedisIdSegmentDistributor createDistributor(int step) { 0, step, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, - redisClient.connect().async()); + redisClient.connect().reactive()); } diff --git a/cosid-redis/src/main/java/me/ahoo/cosid/redis/RedisIdSegmentDistributor.java b/cosid-redis/src/main/java/me/ahoo/cosid/redis/RedisIdSegmentDistributor.java index 9ad980e2ae..03b5200e3e 100644 --- a/cosid-redis/src/main/java/me/ahoo/cosid/redis/RedisIdSegmentDistributor.java +++ b/cosid-redis/src/main/java/me/ahoo/cosid/redis/RedisIdSegmentDistributor.java @@ -15,16 +15,12 @@ import com.google.common.base.Preconditions; import com.google.common.base.Strings; -import io.lettuce.core.ScriptOutputType; -import io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands; +import io.lettuce.core.cluster.api.reactive.RedisClusterReactiveCommands; import lombok.extern.slf4j.Slf4j; import me.ahoo.cosid.CosId; import me.ahoo.cosid.segment.IdSegmentDistributor; -import me.ahoo.cosky.core.redis.RedisScripts; -import me.ahoo.cosky.core.util.Futures; import java.time.Duration; -import java.util.concurrent.CompletableFuture; import static me.ahoo.cosid.redis.RedisMachineIdDistributor.hashTag; @@ -47,12 +43,12 @@ public class RedisIdSegmentDistributor implements IdSegmentDistributor { private final long offset; private final long step; private final Duration timeout; - private final RedisClusterAsyncCommands redisCommands; + private final RedisClusterReactiveCommands redisCommands; private volatile long lastMaxId; public RedisIdSegmentDistributor(String namespace, String name, - RedisClusterAsyncCommands redisCommands) { + RedisClusterReactiveCommands redisCommands) { this(namespace, name, DEFAULT_OFFSET, DEFAULT_STEP, DEFAULT_TIMEOUT, redisCommands); } @@ -61,7 +57,7 @@ public RedisIdSegmentDistributor(String namespace, long offset, long step, Duration timeout, - RedisClusterAsyncCommands redisCommands) { + RedisClusterReactiveCommands redisCommands) { Preconditions.checkArgument(!Strings.isNullOrEmpty(namespace), "namespace can not be empty!"); Preconditions.checkArgument(!Strings.isNullOrEmpty(name), "name can not be empty!"); Preconditions.checkArgument(offset >= 0, "offset:[%s] must be greater than or equal to 0!", offset); @@ -81,7 +77,7 @@ private void ensureOffset() { if (log.isDebugEnabled()) { log.debug("ensureOffset -[{}]- offset:[{}].", adderKey, offset); } - Boolean notExists = Futures.getUnChecked(redisCommands.setnx(this.adderKey, String.valueOf(offset)), timeout); + Boolean notExists = redisCommands.setnx(this.adderKey, String.valueOf(offset)).block(timeout); if (log.isDebugEnabled()) { log.debug("ensureOffset -[{}]- offset:[{}] - notExists:[{}].", adderKey, offset, notExists); } @@ -118,7 +114,7 @@ public long nextMaxId(long step) { } final long nextMinMaxId = lastMaxId + step; - long nextMaxId = Futures.getUnChecked(redisCommands.incrby(adderKey, step), timeout); + long nextMaxId = redisCommands.incrby(adderKey, step).block(timeout); if (log.isDebugEnabled()) { log.debug("nextMaxId -[{}]- step:[{}] - nextMaxId:[{}].", adderKey, step, nextMaxId); } diff --git a/cosid-redis/src/main/java/me/ahoo/cosid/redis/RedisMachineIdDistributor.java b/cosid-redis/src/main/java/me/ahoo/cosid/redis/RedisMachineIdDistributor.java index 7366c2c65f..4f3ee07cf5 100644 --- a/cosid-redis/src/main/java/me/ahoo/cosid/redis/RedisMachineIdDistributor.java +++ b/cosid-redis/src/main/java/me/ahoo/cosid/redis/RedisMachineIdDistributor.java @@ -14,16 +14,15 @@ package me.ahoo.cosid.redis; import io.lettuce.core.ScriptOutputType; -import io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands; +import io.lettuce.core.cluster.api.reactive.RedisClusterReactiveCommands; import lombok.extern.slf4j.Slf4j; import me.ahoo.cosid.snowflake.ClockBackwardsSynchronizer; import me.ahoo.cosid.snowflake.machine.*; -import me.ahoo.cosid.util.Futures; import me.ahoo.cosky.core.redis.RedisScripts; +import reactor.core.publisher.Mono; import java.time.Duration; import java.util.List; -import java.util.concurrent.CompletableFuture; import static me.ahoo.cosid.snowflake.ClockBackwardsSynchronizer.getBackwardsTimeStamp; @@ -37,15 +36,15 @@ public class RedisMachineIdDistributor extends AbstractMachineIdDistributor { public static final String MACHINE_ID_REVERT_STABLE = "machine_id_revert_stable.lua"; public static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(1); public final Duration timeout; - private final RedisClusterAsyncCommands redisCommands; + private final RedisClusterReactiveCommands redisCommands; - public RedisMachineIdDistributor(RedisClusterAsyncCommands redisCommands, + public RedisMachineIdDistributor(RedisClusterReactiveCommands redisCommands, MachineStateStorage machineStateStorage, ClockBackwardsSynchronizer clockBackwardsSynchronizer) { this(DEFAULT_TIMEOUT, redisCommands, machineStateStorage, clockBackwardsSynchronizer); } - public RedisMachineIdDistributor(Duration timeout, RedisClusterAsyncCommands redisCommands, + public RedisMachineIdDistributor(Duration timeout, RedisClusterReactiveCommands redisCommands, MachineStateStorage machineStateStorage, ClockBackwardsSynchronizer clockBackwardsSynchronizer) { super(machineStateStorage, clockBackwardsSynchronizer); @@ -57,14 +56,14 @@ public RedisMachineIdDistributor(Duration timeout, RedisClusterAsyncCommands distributeAsync0(String namespace, int machineBit, InstanceId instanceId) { + protected Mono distributeAsync0(String namespace, int machineBit, InstanceId instanceId) { if (log.isInfoEnabled()) { log.info("distributeAsync0 - instanceId:[{}] - machineBit:[{}] @ namespace:[{}].", instanceId, machineBit, namespace); } @@ -72,9 +71,9 @@ protected CompletableFuture distributeAsync0(String namespace, int (scriptSha) -> { String[] keys = {hashTag(namespace)}; String[] values = {instanceId.getInstanceId(), String.valueOf(maxMachineId(machineBit))}; - return redisCommands.evalsha(scriptSha, ScriptOutputType.MULTI, keys, values); + return redisCommands.evalsha(scriptSha, ScriptOutputType.MULTI, keys, values).next(); } - ).thenApply(distribution -> { + ).map(distribution -> { @SuppressWarnings("unchecked") List state = (List) distribution; int realMachineId = state.get(0).intValue(); @@ -95,7 +94,7 @@ protected CompletableFuture distributeAsync0(String namespace, int @Override protected void revert0(String namespace, InstanceId instanceId, MachineState machineState) { - Futures.getUnChecked(revertAsync0(namespace, instanceId, machineState),timeout); + revertAsync0(namespace, instanceId, machineState).block(timeout); } /** @@ -106,7 +105,7 @@ protected void revert0(String namespace, InstanceId instanceId, MachineState mac * @param machineState * @return */ - protected CompletableFuture revertAsync0(String namespace, InstanceId instanceId, MachineState machineState) { + protected Mono revertAsync0(String namespace, InstanceId instanceId, MachineState machineState) { if (log.isInfoEnabled()) { log.info("revertAsync - instanceId:[{}] @ namespace:[{}].", instanceId, namespace); } @@ -118,7 +117,7 @@ protected CompletableFuture revertAsync0(String namespace, InstanceId inst return revertScriptAsync(MACHINE_ID_REVERT, namespace, instanceId, machineState); } - private CompletableFuture revertScriptAsync(String scriptName, String namespace, InstanceId instanceId, MachineState machineState) { + private Mono revertScriptAsync(String scriptName, String namespace, InstanceId instanceId, MachineState machineState) { return RedisScripts.doEnsureScript(scriptName, redisCommands, (scriptSha) -> { long lastStamp = machineState.getLastTimeStamp(); @@ -127,7 +126,7 @@ private CompletableFuture revertScriptAsync(String scriptName, String name } String[] keys = {hashTag(namespace)}; String[] values = {instanceId.getInstanceId(), String.valueOf(lastStamp)}; - return redisCommands.evalsha(scriptSha, ScriptOutputType.INTEGER, keys, values); + return redisCommands.evalsha(scriptSha, ScriptOutputType.INTEGER, keys, values).then(); } ); } diff --git a/cosid-redis/src/test/java/me/ahoo/cosid/redis/RedisIdIdSegmentDistributorTest.java b/cosid-redis/src/test/java/me/ahoo/cosid/redis/RedisIdIdSegmentDistributorTest.java index 276d92331a..77052889a9 100644 --- a/cosid-redis/src/test/java/me/ahoo/cosid/redis/RedisIdIdSegmentDistributorTest.java +++ b/cosid-redis/src/test/java/me/ahoo/cosid/redis/RedisIdIdSegmentDistributorTest.java @@ -42,7 +42,7 @@ private void initRedis() { System.out.println("--- initRedis ---"); redisClient = RedisClient.create("redis://localhost:6379"); redisConnection = redisClient.connect(); - redisMaxIdDistributor = new RedisIdSegmentDistributor(UUID.randomUUID().toString(), "RedisIdGeneratorTest", 0, 100, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().async()); + redisMaxIdDistributor = new RedisIdSegmentDistributor(UUID.randomUUID().toString(), "RedisIdGeneratorTest", 0, 100, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().reactive()); } @Test @@ -79,7 +79,7 @@ public void generateIfMaxIdBack() { @Test public void generate_offset() { String namespace = UUID.randomUUID().toString(); - RedisIdSegmentDistributor redisMaxIdDistributor_offset_10 = new RedisIdSegmentDistributor(namespace, "generate_offset", 10, 100, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().async()); + RedisIdSegmentDistributor redisMaxIdDistributor_offset_10 = new RedisIdSegmentDistributor(namespace, "generate_offset", 10, 100, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().reactive()); long id = redisMaxIdDistributor_offset_10.nextMaxId(); Assertions.assertEquals(110, id); } @@ -90,7 +90,7 @@ public void generate_offset() { @Test public void concurrent_generate_step_100() { String namespace = UUID.randomUUID().toString(); - RedisIdSegmentDistributor redisMaxIdDistributor_generate_step_100 = new RedisIdSegmentDistributor(namespace, "generate_step_10", 0, 100, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().async()); + RedisIdSegmentDistributor redisMaxIdDistributor_generate_step_100 = new RedisIdSegmentDistributor(namespace, "generate_step_10", 0, 100, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().reactive()); SegmentId defaultSegmentId = new DefaultSegmentId(redisMaxIdDistributor_generate_step_100); CompletableFuture>[] completableFutures = new CompletableFuture[CONCURRENT_THREADS]; int threads = 0; @@ -137,8 +137,8 @@ public void concurrent_generate_step_100() { @Test public void concurrent_generate_step_10_multi_instance() { String namespace = UUID.randomUUID().toString(); - RedisIdSegmentDistributor redisMaxIdDistributor1 = new RedisIdSegmentDistributor(namespace, "generate_step_10", 0, 10, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().async()); - RedisIdSegmentDistributor redisMaxIdDistributor2 = new RedisIdSegmentDistributor(namespace, "generate_step_10", 0, 10, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().async()); + RedisIdSegmentDistributor redisMaxIdDistributor1 = new RedisIdSegmentDistributor(namespace, "generate_step_10", 0, 10, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().reactive()); + RedisIdSegmentDistributor redisMaxIdDistributor2 = new RedisIdSegmentDistributor(namespace, "generate_step_10", 0, 10, RedisIdSegmentDistributor.DEFAULT_TIMEOUT, redisClient.connect().reactive()); SegmentId idGenerator1 = new DefaultSegmentId(redisMaxIdDistributor1); SegmentId idGenerator2 = new DefaultSegmentId(redisMaxIdDistributor2); diff --git a/cosid-redis/src/test/java/me/ahoo/cosid/redis/RedisMachineIdDistributorTest.java b/cosid-redis/src/test/java/me/ahoo/cosid/redis/RedisMachineIdDistributorTest.java index 8d77a770fe..ec2d7bf507 100644 --- a/cosid-redis/src/test/java/me/ahoo/cosid/redis/RedisMachineIdDistributorTest.java +++ b/cosid-redis/src/test/java/me/ahoo/cosid/redis/RedisMachineIdDistributorTest.java @@ -39,7 +39,7 @@ private void initRedis() { System.out.println("--- initRedis ---"); redisClient = RedisClient.create("redis://localhost:6379"); redisConnection = redisClient.connect(); - redisMachineIdDistributor = new RedisMachineIdDistributor(redisConnection.async(), MachineStateStorage.LOCAL, ClockBackwardsSynchronizer.DEFAULT); + redisMachineIdDistributor = new RedisMachineIdDistributor(redisConnection.reactive(), MachineStateStorage.LOCAL, ClockBackwardsSynchronizer.DEFAULT); } @Test diff --git a/cosid-spring-boot-starter/src/main/java/me/ahoo/cosid/spring/boot/starter/segment/CosIdRedisSegmentAutoConfiguration.java b/cosid-spring-boot-starter/src/main/java/me/ahoo/cosid/spring/boot/starter/segment/CosIdRedisSegmentAutoConfiguration.java index d810af2387..d4e3e540dd 100644 --- a/cosid-spring-boot-starter/src/main/java/me/ahoo/cosid/spring/boot/starter/segment/CosIdRedisSegmentAutoConfiguration.java +++ b/cosid-spring-boot-starter/src/main/java/me/ahoo/cosid/spring/boot/starter/segment/CosIdRedisSegmentAutoConfiguration.java @@ -78,7 +78,7 @@ private SegmentId createSegmentId(String name, SegmentIdProperties.IdDefinition idDefinition.getOffset(), idDefinition.getStep(), timeout, - redisConnectionFactory.getShareAsyncCommands()); + redisConnectionFactory.getShareReactiveCommands()); return CosIdSegmentAutoConfiguration.createSegment(segmentIdProperties, idDefinition, redisIdSegmentDistributor, prefetchWorkerExecutorService); } diff --git a/cosid-spring-boot-starter/src/main/java/me/ahoo/cosid/spring/boot/starter/snowflake/CosIdRedisMachineIdDistributorAutoConfiguration.java b/cosid-spring-boot-starter/src/main/java/me/ahoo/cosid/spring/boot/starter/snowflake/CosIdRedisMachineIdDistributorAutoConfiguration.java index 3757209edd..9c261c2a20 100644 --- a/cosid-spring-boot-starter/src/main/java/me/ahoo/cosid/spring/boot/starter/snowflake/CosIdRedisMachineIdDistributorAutoConfiguration.java +++ b/cosid-spring-boot-starter/src/main/java/me/ahoo/cosid/spring/boot/starter/snowflake/CosIdRedisMachineIdDistributorAutoConfiguration.java @@ -51,7 +51,7 @@ public CosIdRedisMachineIdDistributorAutoConfiguration(SnowflakeIdProperties sno public RedisMachineIdDistributor redisMachineIdDistributor(RedisConnectionFactory redisConnectionFactory, MachineStateStorage localMachineState, ClockBackwardsSynchronizer clockBackwardsSynchronizer) { Preconditions.checkNotNull(redisConnectionFactory, "redisConnectionFactory can not be null."); Duration timeout = snowflakeIdProperties.getMachine().getDistributor().getRedis().getTimeout(); - return new RedisMachineIdDistributor(timeout, redisConnectionFactory.getShareAsyncCommands(), localMachineState, clockBackwardsSynchronizer); + return new RedisMachineIdDistributor(timeout, redisConnectionFactory.getShareReactiveCommands(), localMachineState, clockBackwardsSynchronizer); } diff --git a/gradle.properties b/gradle.properties index c1be60c694..7a422bb185 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ # group=me.ahoo.cosid -version=1.3.13 +version=1.3.14 description=Global distributed ID generator website=https://github.com/Ahoo-Wang/CosId diff --git a/wiki/getting-started.md b/wiki/getting-started.md index 650bef1e9d..62b47b33d6 100644 --- a/wiki/getting-started.md +++ b/wiki/getting-started.md @@ -383,7 +383,7 @@ public interface OrderRepository { > Kotlin DSL ``` kotlin - val cosidVersion = "1.3.13"; + val cosidVersion = "1.3.14"; implementation("me.ahoo.cosid:cosid-spring-boot-starter:${cosidVersion}") ``` @@ -399,7 +399,7 @@ public interface OrderRepository { 4.0.0 demo - 1.3.13 + 1.3.14 @@ -487,7 +487,7 @@ cosid: ``` shell gradle cosid-core:jmh # or -java -jar cosid-core/build/libs/cosid-core-1.3.13-jmh.jar -bm thrpt -wi 1 -rf json -f 1 +java -jar cosid-core/build/libs/cosid-core-1.3.14-jmh.jar -bm thrpt -wi 1 -rf json -f 1 ``` ``` @@ -508,7 +508,7 @@ SnowflakeIdBenchmark.secondSnowflakeId_generate thrpt 4206843. ``` shell gradle cosid-redis:jmh # or -java -jar cosid-redis/build/libs/cosid-redis-1.3.13-jmh.jar -bm thrpt -wi 1 -rf json -f 1 RedisChainIdBenchmark +java -jar cosid-redis/build/libs/cosid-redis-1.3.14-jmh.jar -bm thrpt -wi 1 -rf json -f 1 RedisChainIdBenchmark ``` ``` @@ -526,7 +526,7 @@ RedisChainIdBenchmark.step_1000 thrpt 5 127439148.104 ± 1833743 ![RedisChainIdBenchmark-Sample](../docs/jmh/RedisChainIdBenchmark-Sample.png) ```shell -java -jar cosid-redis/build/libs/cosid-redis-1.3.13-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000 +java -jar cosid-redis/build/libs/cosid-redis-1.3.14-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000 ``` ``` @@ -551,7 +551,7 @@ RedisChainIdBenchmark.step_1000:step_1000·p1.00 sample 37.440 ``` shell gradle cosid-jdbc:jmh # or -java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.13-jmh.jar -bm thrpt -wi 1 -rf json -f 1 MySqlChainIdBenchmark +java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.14-jmh.jar -bm thrpt -wi 1 -rf json -f 1 MySqlChainIdBenchmark ``` ``` @@ -567,7 +567,7 @@ MySqlChainIdBenchmark.step_1000 thrpt 5 123131804.260 ± 1488004. ![MySqlChainIdBenchmark-Sample](../docs/jmh/MySqlChainIdBenchmark-Sample.png) ```shell -java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.13-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000 +java -jar cosid-jdbc/build/libs/cosid-jdbc-1.3.14-jmh.jar -bm sample -wi 1 -rf json -f 1 -tu us step_1000 ``` ```