-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v3.0.0.preview.20.x' into v3.0.0-beta-M
# Conflicts: # buildSrc/src/main/kotlin/P.kt
- v4.11.0
- v4.10.0
- v4.9.0
- v4.8.0
- v4.7.0
- v4.7.0-beta1
- v4.6.1
- v4.6.0
- v4.5.0
- v4.4.0
- v4.3.1
- v4.3.0
- v4.2.0
- v4.1.0
- v4.0.1
- v4.0.0
- v4.0.0-dev18
- v4.0.0-dev17
- v4.0.0-dev16
- v4.0.0-dev15
- v4.0.0-dev14
- v4.0.0-dev13
- v4.0.0-dev12
- v4.0.0-dev11
- v4.0.0-dev10
- v4.0.0-dev9
- v4.0.0-dev8
- v4.0.0-dev7
- v4.0.0-dev6
- v4.0.0-dev5
- v4.0.0-dev4
- v4.0.0-dev3
- v4.0.0-dev2
- v4.0.0-dev1
- v4.0.0-beta3
- v4.0.0-beta2
- v4.0.0-beta1
- v4.0.0-RC3
- v4.0.0-RC2
- v4.0.0-RC1
- v3.3.0
- v3.3.0-beta1
- v3.2.0
- v3.1.0
- v3.0.0
- v3.0.0-beta-RC.2
- v3.0.0-beta-RC.1
- v3.0.0-beta-M3
- v3.0.0-beta-M2
- v3.0.0-beta.3
- v3.0.0-beta.3-dev.9
- v3.0.0-beta.3-dev.8
- v3.0.0-beta.3-dev.7
- v3.0.0-beta.3-dev.6
- v3.0.0-beta.3-dev.5
- v3.0.0-beta.3-dev.4
- v3.0.0-beta.3-dev.3
- v3.0.0-beta.3-dev.2
- v3.0.0-beta.3-dev.1
- v3.0.0-beta.2
- v3.0.0-beta
- v3.0.0-RC.3
- v3.0.0-RC.2
- v3.0.0-RC
- v3.0.0-M6
- v3.0.0-M5
- v3.0.0-M4
- v3.0.0-M3
- v3.0.0-M2
- v3.0.0-M1
- v2.5.0
Showing
50 changed files
with
2,045 additions
and
593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
**仓库参考:** | ||
|
||
| **模块** | **repo1.maven** | **search.maven** | | ||
|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| simbot-api | [simbot-api: v3.0.0.preview.19.0](https://repo1.maven.org/maven2/love/forte/simbot/simbot-api/3.0.0.preview.19.0) | [simbot-api: v3.0.0.preview.19.0](https://search.maven.org/artifact/love.forte.simbot/simbot-api/3.0.0.preview.19.0/jar) | | ||
| simbot-core | [simbot-core: v3.0.0.preview.19.0](https://repo1.maven.org/maven2/love/forte/simbot/simbot-core/3.0.0.preview.19.0) | [simbot-core: v3.0.0.preview.19.0](https://search.maven.org/artifact/love.forte.simbot/simbot-core/3.0.0.preview.19.0/jar) | | ||
| simbot-logger | [simbot-logger: v3.0.0.preview.19.0](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger/3.0.0.preview.19.0) | [simbot-logger: v3.0.0.preview.19.0](https://search.maven.org/artifact/love.forte.simbot/simbot-logger/3.0.0.preview.19.0/jar) | | ||
| simboot-api | [simboot-api: v3.0.0.preview.19.0](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-api/3.0.0.preview.19.0) | [simboot-api: v3.0.0.preview.19.0](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-api/3.0.0.preview.19.0/jar) | | ||
| simboot-core | [simboot-core: v3.0.0.preview.19.0](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core/3.0.0.preview.19.0) | [simboot-core: v3.0.0.preview.19.0](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core/3.0.0.preview.19.0/jar) | | ||
| simboot-core-annotation | [simboot-core-annotation: v3.0.0.preview.19.0](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-annotation/3.0.0.preview.19.0) | [simboot-core-annotation: v3.0.0.preview.19.0](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-annotation/3.0.0.preview.19.0/jar) | | ||
| simboot-core-spring-boot-starter | [simboot-core-spring-boot-starter: v3.0.0.preview.19.0](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-spring-boot-starter/3.0.0.preview.19.0) | [simboot-core-spring-boot-starter: v3.0.0.preview.19.0](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-spring-boot-starter/3.0.0.preview.19.0/jar) | | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
**仓库参考:** | ||
|
||
| **模块** | **repo1.maven** | **search.maven** | | ||
|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| simbot-api | [simbot-api: v3.0.0.preview.20.0](https://repo1.maven.org/maven2/love/forte/simbot/simbot-api/3.0.0.preview.20.0) | [simbot-api: v3.0.0.preview.20.0](https://search.maven.org/artifact/love.forte.simbot/simbot-api/3.0.0.preview.20.0/jar) | | ||
| simbot-core | [simbot-core: v3.0.0.preview.20.0](https://repo1.maven.org/maven2/love/forte/simbot/simbot-core/3.0.0.preview.20.0) | [simbot-core: v3.0.0.preview.20.0](https://search.maven.org/artifact/love.forte.simbot/simbot-core/3.0.0.preview.20.0/jar) | | ||
| simbot-logger | [simbot-logger: v3.0.0.preview.20.0](https://repo1.maven.org/maven2/love/forte/simbot/simbot-logger/3.0.0.preview.20.0) | [simbot-logger: v3.0.0.preview.20.0](https://search.maven.org/artifact/love.forte.simbot/simbot-logger/3.0.0.preview.20.0/jar) | | ||
| simboot-api | [simboot-api: v3.0.0.preview.20.0](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-api/3.0.0.preview.20.0) | [simboot-api: v3.0.0.preview.20.0](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-api/3.0.0.preview.20.0/jar) | | ||
| simboot-core | [simboot-core: v3.0.0.preview.20.0](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core/3.0.0.preview.20.0) | [simboot-core: v3.0.0.preview.20.0](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core/3.0.0.preview.20.0/jar) | | ||
| simboot-core-annotation | [simboot-core-annotation: v3.0.0.preview.20.0](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-annotation/3.0.0.preview.20.0) | [simboot-core-annotation: v3.0.0.preview.20.0](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-annotation/3.0.0.preview.20.0/jar) | | ||
| simboot-core-spring-boot-starter | [simboot-core-spring-boot-starter: v3.0.0.preview.20.0](https://repo1.maven.org/maven2/love/forte/simbot/boot/simboot-core-spring-boot-starter/3.0.0.preview.20.0) | [simboot-core-spring-boot-starter: v3.0.0.preview.20.0](https://search.maven.org/artifact/love.forte.simbot.boot/simboot-core-spring-boot-starter/3.0.0.preview.20.0/jar) | | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,107 @@ | ||
# 性能测试报告 | ||
|
||
此处会针对一部分需要可能需要关注、可能需要进行对比的相关api进行性能测试。 | ||
如果你对某些内容的性能对比感兴趣、或者对某些内容有好的优化策略/方案,欢迎通过 | ||
如果你对某些内容的性能对比感兴趣、或者对某些内容有好的方案或建议,欢迎通过 | ||
[issues](https://github.com/ForteScarlet/simpler-robot/issues/new/choose) 分享你的想法 | ||
或 [pr](https://github.com/ForteScarlet/simpler-robot/pulls) 贡献你的力量,十分感谢。 | ||
|
||
这些测试内容都应可以从相关的测试模块中找到。 | ||
|
||
## randomID(Random) | ||
|
||
> [IDTest.kt](simbot-apis/simbot-api/src/test/kotlin/jmh/IdTest.kt) | ||
针对内容: | ||
|
||
- `randomID()` 对比 `UUID.randomUUID` | ||
- `randomID()` 使用 `kotlin.Random.Default` 对比 `ThreadLocalRandom` | ||
|
||
> JMH version: 1.33 | ||
> VM version: JDK 1.8.0_332, OpenJDK 64-Bit Server VM, 25.332-b09 | ||
``` | ||
# JMH version: 1.33 | ||
# VM version: JDK 1.8.0_332, OpenJDK 64-Bit Server VM, 25.332-b09 | ||
# Threads: 8 threads, will synchronize iterations | ||
Benchmark Mode Cnt Score Error Units | ||
IdTest.randomIdByDefaultGenerate thrpt 25 70801412.214 ± 1498689.005 ops/s | ||
IdTest.randomIdByThreadLocalRandomGenerate thrpt 25 66505118.175 ± 730902.232 ops/s | ||
IdTest.randomUUIDGenerate thrpt 25 1435474.691 ± 39339.236 ops/s | ||
``` | ||
|
||
## TimeDuration | ||
|
||
> [DurationTest](simbot-project-tests/simbot-project-test-jmh-duration/src/main/kotlin/love/forte/simbotest/duration/DurationTest.kt) | ||
针对内容: | ||
|
||
对几个可以代表"Duration"的类型的单位转化效率的测试。 | ||
包括: | ||
|
||
- `kotlin.time.Duration` | ||
- `java.time.Duration` | ||
- `java.util.concurrent.TimeUnit` | ||
|
||
> 讲道理,`kotiln.time.Duration` 的表现结果我是没想到会是这样。唔。。也许是我的使用方式有误? | ||
**第一轮** | ||
|
||
> JMH version: 1.35 | ||
> VM version: JDK 17.0.3, OpenJDK 64-Bit Server VM, 17.0.3+7-LTS | ||
``` | ||
Benchmark Mode Cnt Score Error Units | ||
DurationTest.MilliToSecond thrpt 2 355646.441 ops/ms | ||
DurationTest.MilliToSecond:javaDurationMilliToSecond thrpt 2 211252.355 ops/ms | ||
DurationTest.MilliToSecond:ktDurationMilliToSecond thrpt 2 42129.351 ops/ms | ||
DurationTest.MilliToSecond:timeUnitMilliToSecond thrpt 2 102264.734 ops/ms | ||
DurationTest.SecondToMilli thrpt 2 554247.894 ops/ms | ||
DurationTest.SecondToMilli:javaDurationSecondToMilli thrpt 2 223422.624 ops/ms | ||
DurationTest.SecondToMilli:ktDurationSecondToMilli thrpt 2 42339.539 ops/ms | ||
DurationTest.SecondToMilli:timeUnitSecondToMilli thrpt 2 288485.731 ops/ms | ||
``` | ||
|
||
**第二轮** | ||
|
||
> JMH version: 1.35 | ||
> VM version: JDK 1.8.0_332, OpenJDK 64-Bit Server VM, 25.332-b09 | ||
``` | ||
Benchmark Mode Cnt Score Error Units | ||
DurationTest.MilliToSecond thrpt 2 501943.887 ops/ms | ||
DurationTest.MilliToSecond:javaDurationMilliToSecond thrpt 2 173481.768 ops/ms | ||
DurationTest.MilliToSecond:ktDurationMilliToSecond thrpt 2 107571.847 ops/ms | ||
DurationTest.MilliToSecond:timeUnitMilliToSecond thrpt 2 220890.272 ops/ms | ||
DurationTest.SecondToMilli thrpt 2 536347.374 ops/ms | ||
DurationTest.SecondToMilli:javaDurationSecondToMilli thrpt 2 212098.647 ops/ms | ||
DurationTest.SecondToMilli:ktDurationSecondToMilli thrpt 2 104243.386 ops/ms | ||
DurationTest.SecondToMilli:timeUnitSecondToMilli thrpt 2 220005.341 ops/ms | ||
``` | ||
|
||
## DurationConvert | ||
|
||
> [DurationConvertTest](simbot-apis/simbot-api/src/test/kotlin/jmh/DurationConvertTest.kt) | ||
针对内容: | ||
|
||
`java.time.Duration` 和 `TimeUnit` 向 `kotlin.time.Duration` 转化时的性能。 | ||
|
||
**第一轮** | ||
|
||
> JMH version: 1.35 | ||
> VM version: JDK 17.0.2, OpenJDK 64-Bit Server VM, 17.0.2+8-86 | ||
``` | ||
Benchmark Mode Cnt Score Error Units | ||
DurationConvertTest.MinutesDuration thrpt 447133.994 ops/ms | ||
DurationConvertTest.MinutesDuration:javaMinutesDuration thrpt 76914.765 ops/ms | ||
DurationConvertTest.MinutesDuration:javaMinutesDurationSimbot thrpt 103878.816 ops/ms | ||
DurationConvertTest.MinutesDuration:minutesTimeUnit thrpt 266340.413 ops/ms | ||
DurationConvertTest.SecondsDuration thrpt 533031.432 ops/ms | ||
DurationConvertTest.SecondsDuration:javaSecondsDuration thrpt 77124.192 ops/ms | ||
DurationConvertTest.SecondsDuration:javaSecondsDurationSimbot thrpt 106764.854 ops/ms | ||
DurationConvertTest.SecondsDuration:secondsTimeUnit thrpt 349142.386 ops/ms | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.