Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark for hash api #299

Merged
merged 1 commit into from
Mar 1, 2021
Merged

Conversation

jxnu-liguobin
Copy link
Collaborator

@jxnu-liguobin jxnu-liguobin commented Feb 28, 2021

Closes #167

Hscanis not implemented in all libraries, so it was not tested.

The parameters of some commands provided by the io.chrisdavenport.rediculous and dev.profunktor.redis4cats library are List/Map rather than variable length parameters, which may lead to inaccurate pressure measurement, because we have to construct the list object.

Benchmark machine and redis version.

JDK 11.0.7, OpenJDK 64-Bit Server VM, 11.0.7+10
Redis 6.0.6
MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports) 
CPU 1.4 GHz Four core Intel Core i5 
Memory 8 GB 2133 MHz LPDDR3

hDel

Benchmark                  (size)   Mode  Cnt   Score   Error  Units
HDelBenchmarks.laserdisc      500  thrpt   30  10.184 ± 0.662  ops/s
HDelBenchmarks.rediculous     500  thrpt   30   9.499 ± 0.336  ops/s
HDelBenchmarks.redis4cats     500  thrpt   30  25.732 ± 0.166  ops/s
HDelBenchmarks.zio            500  thrpt   30  25.525 ± 0.964  ops/s

hExists

Benchmark                     (size)   Mode  Cnt   Score   Error  Units
HExistsBenchmarks.laserdisc      500  thrpt   30  10.031 ± 0.249  ops/s
HExistsBenchmarks.rediculous     500  thrpt   30   8.262 ± 0.517  ops/s
HExistsBenchmarks.redis4cats     500  thrpt   30  21.486 ± 0.810  ops/s
HExistsBenchmarks.zio            500  thrpt   30  19.018 ± 1.788  ops/s

hGetAll

Benchmark                     (size)   Mode  Cnt  Score   Error  Units
HGetAllBenchmarks.laserdisc      500  thrpt   30  0.981 ± 0.093  ops/s
HGetAllBenchmarks.rediculous     500  thrpt   30  2.259 ± 0.040  ops/s
HGetAllBenchmarks.redis4cats     500  thrpt   30  5.154 ± 0.030  ops/s
HGetAllBenchmarks.zio            500  thrpt   30  3.384 ± 0.009  ops/s

hGet

Benchmark                  (size)   Mode  Cnt   Score   Error  Units
HGetBenchmarks.laserdisc      500  thrpt   30  10.050 ± 0.237  ops/s
HGetBenchmarks.rediculous     500  thrpt   30   9.445 ± 0.193  ops/s
HGetBenchmarks.redis4cats     500  thrpt   30  24.090 ± 0.573  ops/s
HGetBenchmarks.zio            500  thrpt   30  23.476 ± 0.254  ops/s

hIncrBy

Benchmark                     (increment)  (size)   Mode  Cnt   Score   Error  Units
HIncrbyBenchmarks.laserdisc             1     500  thrpt   30   9.485 ± 0.418  ops/s
HIncrbyBenchmarks.rediculous            1     500  thrpt   30   8.491 ± 0.356  ops/s
HIncrbyBenchmarks.redis4cats            1     500  thrpt   30  23.164 ± 0.066  ops/s
HIncrbyBenchmarks.zio                   1     500  thrpt   30  22.115 ± 0.314  ops/s

hIncrByFloat

Benchmark                          (increment)  (size)   Mode  Cnt   Score   Error  Units
HIncrbyFloatBenchmarks.laserdisc           1.0     500  thrpt   30   9.008 ± 0.575  ops/s
HIncrbyFloatBenchmarks.rediculous          1.0     500  thrpt   30   8.920 ± 0.059  ops/s
HIncrbyFloatBenchmarks.redis4cats          1.0     500  thrpt   30  22.434 ± 0.256  ops/s
HIncrbyFloatBenchmarks.zio                 1.0     500  thrpt   30  21.107 ± 0.624  ops/s

hKeys

Benchmark                   (size)   Mode  Cnt   Score   Error  Units
HKeysBenchmarks.laserdisc      500  thrpt   30   1.752 ± 0.055  ops/s
HKeysBenchmarks.rediculous     500  thrpt   30   4.280 ± 0.036  ops/s
HKeysBenchmarks.redis4cats     500  thrpt   30  10.095 ± 0.049  ops/s
HKeysBenchmarks.zio            500  thrpt   30   6.743 ± 0.097  ops/s

hLen

Benchmark                  (size)   Mode  Cnt   Score   Error  Units
HLenBenchmarks.laserdisc      500  thrpt   30  10.796 ± 0.428  ops/s
HLenBenchmarks.rediculous     500  thrpt   30   8.650 ± 0.353  ops/s
HLenBenchmarks.redis4cats     500  thrpt   30  23.581 ± 1.248  ops/s
HLenBenchmarks.zio            500  thrpt   30  25.980 ± 0.297  ops/s

hmGet

Benchmark                   (size)   Mode  Cnt   Score   Error  Units
HMGetBenchmarks.laserdisc      500  thrpt   30  10.440 ± 0.342  ops/s
HMGetBenchmarks.rediculous     500  thrpt   30   9.359 ± 0.540  ops/s
HMGetBenchmarks.redis4cats     500  thrpt   30  24.697 ± 0.120  ops/s
HMGetBenchmarks.zio            500  thrpt   30  24.267 ± 0.174  ops/s

hmSet

Benchmark                   (size)   Mode  Cnt   Score   Error  Units
HMSetBenchmarks.laserdisc      500  thrpt   30  10.806 ± 0.155  ops/s
HMSetBenchmarks.rediculous     500  thrpt   30   9.738 ± 0.099  ops/s
HMSetBenchmarks.redis4cats     500  thrpt   30  24.428 ± 0.303  ops/s
HMSetBenchmarks.zio            500  thrpt   30  19.743 ± 3.444  ops/s

hSet

Benchmark                  (size)   Mode  Cnt   Score   Error  Units
HSetBenchmarks.laserdisc      500  thrpt   30  10.371 ± 0.164  ops/s
HSetBenchmarks.rediculous     500  thrpt   30   9.063 ± 0.582  ops/s
HSetBenchmarks.redis4cats     500  thrpt   30  24.504 ± 0.436  ops/s
HSetBenchmarks.zio            500  thrpt   30  23.313 ± 0.114  ops/s

hSetNx

Benchmark                    (size)   Mode  Cnt   Score   Error  Units
HSetNxBenchmarks.laserdisc      500  thrpt   30  10.667 ± 0.116  ops/s
HSetNxBenchmarks.rediculous     500  thrpt   30   9.799 ± 0.127  ops/s
HSetNxBenchmarks.redis4cats     500  thrpt   30  24.955 ± 0.226  ops/s
HSetNxBenchmarks.zio            500  thrpt   30  23.467 ± 0.544  ops/s

hStrLen

Benchmark                     (size)   Mode  Cnt   Score   Error  Units
HStrLenBenchmarks.laserdisc      500  thrpt   30   9.820 ± 0.349  ops/s
HStrLenBenchmarks.rediculous     500  thrpt   30   9.783 ± 0.326  ops/s
HStrLenBenchmarks.redis4cats     500  thrpt   30  24.690 ± 0.194  ops/s
HStrLenBenchmarks.zio            500  thrpt   30  24.409 ± 0.146  ops/s

hVals

Benchmark                   (size)   Mode  Cnt  Score   Error  Units
HValsBenchmarks.laserdisc      500  thrpt   30  1.691 ± 0.010  ops/s
HValsBenchmarks.rediculous     500  thrpt   30  4.176 ± 0.107  ops/s
HValsBenchmarks.redis4cats     500  thrpt   30  9.886 ± 0.084  ops/s
HValsBenchmarks.zio            500  thrpt   30  6.739 ± 0.055  ops/s

@jxnu-liguobin jxnu-liguobin requested a review from a team as a code owner February 28, 2021 05:01
@jxnu-liguobin jxnu-liguobin marked this pull request as draft February 28, 2021 05:01
@jxnu-liguobin jxnu-liguobin marked this pull request as ready for review February 28, 2021 15:48
@mijicd mijicd merged commit 8e669af into zio:master Mar 1, 2021
@jxnu-liguobin jxnu-liguobin deleted the hashs-api-benchmark branch March 1, 2021 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Benchmark hashes API
2 participants