resp-benchmark 0.1.4__cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl → 0.1.6__cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of resp-benchmark might be problematic. Click here for more details.
- resp_benchmark/__init__.py +1 -1
- resp_benchmark/_resp_benchmark_rust_lib.cpython-310-arm-linux-gnueabihf.so +0 -0
- resp_benchmark/cli.py +4 -4
- resp_benchmark/wrapper.py +2 -30
- {resp_benchmark-0.1.4.dist-info → resp_benchmark-0.1.6.dist-info}/METADATA +13 -7
- resp_benchmark-0.1.6.dist-info/RECORD +10 -0
- resp_benchmark-0.1.4.dist-info/RECORD +0 -10
- {resp_benchmark-0.1.4.dist-info → resp_benchmark-0.1.6.dist-info}/WHEEL +0 -0
- {resp_benchmark-0.1.4.dist-info → resp_benchmark-0.1.6.dist-info}/entry_points.txt +0 -0
- {resp_benchmark-0.1.4.dist-info → resp_benchmark-0.1.6.dist-info}/license_files/LICENSE +0 -0
resp_benchmark/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
from .wrapper import Benchmark, Result
|
|
1
|
+
from .wrapper import Benchmark, Result
|
|
Binary file
|
resp_benchmark/cli.py
CHANGED
|
@@ -14,10 +14,10 @@ def parse_args():
|
|
|
14
14
|
parser.add_argument("-p", metavar="port", type=int, default=6379, help="Server port (default 6379)")
|
|
15
15
|
parser.add_argument("-u", metavar="username", type=str, default="", help="Used to send ACL style \"AUTH username pass\". Needs -a.")
|
|
16
16
|
parser.add_argument("-a", metavar="password", type=str, default="", help="Password for Redis Auth")
|
|
17
|
-
parser.add_argument("-c", metavar="clients", type=int, default=
|
|
18
|
-
parser.add_argument("--cores", type=str, default=f"", help="Comma-separated list of CPU cores to use
|
|
19
|
-
parser.add_argument("--cluster", action="store_true", help="
|
|
20
|
-
parser.add_argument("-n", metavar="requests", type=int, default=
|
|
17
|
+
parser.add_argument("-c", metavar="clients", type=int, default=0, help="Number of parallel connections (0 for auto, default: 0)")
|
|
18
|
+
parser.add_argument("--cores", type=str, default=f"", help="Comma-separated list of CPU cores to use (default all)")
|
|
19
|
+
parser.add_argument("--cluster", action="store_true", help="Use cluster mode (default false)")
|
|
20
|
+
parser.add_argument("-n", metavar="requests", type=int, default=0, help="Total number of requests (default 0), 0 for unlimited.")
|
|
21
21
|
parser.add_argument("-s", metavar="seconds", type=int, default=0, help="Total time in seconds (default 0), 0 for unlimited.")
|
|
22
22
|
parser.add_argument("-P", metavar="pipeline", type=int, default=1, help="Pipeline <numreq> requests. Default 1 (no pipeline).")
|
|
23
23
|
# parser.add_argument("--tls", action="store_true", help="Use TLS for connection (default false)")
|
resp_benchmark/wrapper.py
CHANGED
|
@@ -8,23 +8,6 @@ import redis
|
|
|
8
8
|
from .cores import parse_cores_string
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
@dataclass
|
|
12
|
-
class ResultPoint:
|
|
13
|
-
"""
|
|
14
|
-
Represents a single data point in benchmark results.
|
|
15
|
-
|
|
16
|
-
Attributes:
|
|
17
|
-
timestamp_second (int): Unix timestamp in seconds.
|
|
18
|
-
qps (float): Queries per second at this timestamp.
|
|
19
|
-
avg_latency_ms (float): Average latency in milliseconds at this timestamp.
|
|
20
|
-
p99_latency_ms (float): 99th percentile latency in milliseconds at this timestamp.
|
|
21
|
-
"""
|
|
22
|
-
timestamp_second: int
|
|
23
|
-
qps: float
|
|
24
|
-
avg_latency_ms: float
|
|
25
|
-
p99_latency_ms: float
|
|
26
|
-
|
|
27
|
-
|
|
28
11
|
@dataclass
|
|
29
12
|
class Result:
|
|
30
13
|
"""
|
|
@@ -34,12 +17,10 @@ class Result:
|
|
|
34
17
|
qps (float): Average queries per second.
|
|
35
18
|
avg_latency_ms (float): Average latency in milliseconds.
|
|
36
19
|
p99_latency_ms (float): 99th percentile latency in milliseconds.
|
|
37
|
-
per_second_data (List[ResultPoint]): List of per-second data points.
|
|
38
20
|
"""
|
|
39
21
|
qps: float
|
|
40
22
|
avg_latency_ms: float
|
|
41
23
|
p99_latency_ms: float
|
|
42
|
-
per_second_data: List[ResultPoint]
|
|
43
24
|
|
|
44
25
|
|
|
45
26
|
class Benchmark:
|
|
@@ -83,9 +64,9 @@ class Benchmark:
|
|
|
83
64
|
def bench(
|
|
84
65
|
self,
|
|
85
66
|
command: str,
|
|
86
|
-
connections: int =
|
|
67
|
+
connections: int = 0,
|
|
87
68
|
pipeline: int = 1,
|
|
88
|
-
count: int =
|
|
69
|
+
count: int = 0,
|
|
89
70
|
seconds: int = 0,
|
|
90
71
|
quiet: bool = False,
|
|
91
72
|
) -> Result:
|
|
@@ -125,15 +106,6 @@ class Benchmark:
|
|
|
125
106
|
qps=ret.qps,
|
|
126
107
|
avg_latency_ms=ret.avg_latency_ms,
|
|
127
108
|
p99_latency_ms=ret.p99_latency_ms,
|
|
128
|
-
per_second_data=[
|
|
129
|
-
ResultPoint(
|
|
130
|
-
timestamp_second=point.timestamp_second,
|
|
131
|
-
qps=point.qps,
|
|
132
|
-
avg_latency_ms=point.avg_latency_ms,
|
|
133
|
-
p99_latency_ms=point.p99_latency_ms,
|
|
134
|
-
)
|
|
135
|
-
for point in ret.per_second_data
|
|
136
|
-
],
|
|
137
109
|
)
|
|
138
110
|
|
|
139
111
|
return result
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: resp-benchmark
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
7
7
|
Requires-Dist: pydantic
|
|
8
8
|
Requires-Dist: redis
|
|
9
9
|
License-File: LICENSE
|
|
10
|
+
Summary: resp-benchmark is a benchmark tool for testing databases that support the RESP protocol, such as Redis, Valkey, and Tair.
|
|
10
11
|
Requires-Python: >=3.8
|
|
11
12
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
12
13
|
|
|
13
14
|
# resp-benchmark
|
|
14
15
|
|
|
15
|
-
[](https://www.python.org/doc/versions/)
|
|
17
|
+
[](https://pypi.org/project/resp-benchmark/)
|
|
18
|
+
[](https://pypi.org/project/resp-benchmark/)
|
|
19
|
+
[](https://github.com/tair-opensource/resp-benchmark/blob/main/LICENSE)
|
|
16
20
|
|
|
17
21
|
resp-benchmark is a benchmark tool for testing databases that support the RESP protocol,
|
|
18
22
|
such as [Redis](https://github.com/redis/redis), [Valkey](https://github.com/valkey-io/valkey),
|
|
@@ -65,17 +69,19 @@ Supported placeholders include:
|
|
|
65
69
|
### Benchmarking zset
|
|
66
70
|
|
|
67
71
|
```shell
|
|
68
|
-
#
|
|
69
|
-
resp-benchmark --load -
|
|
70
|
-
#
|
|
71
|
-
resp-benchmark "
|
|
72
|
+
# Load data
|
|
73
|
+
resp-benchmark --load -P 10 -c 256 -n 10007000 "ZADD {key sequence 1000} {rand 70000} {key sequence 10007}"
|
|
74
|
+
# Benchmark ZSCORE
|
|
75
|
+
resp-benchmark -s 10 "ZSCORE {key uniform 1000} {key uniform 10007}"
|
|
76
|
+
# Benchmark ZRANGEBYSCORE
|
|
77
|
+
resp-benchmark -s 10 "ZRANGEBYSCORE {key uniform 1000} {range 70000 10}"
|
|
72
78
|
```
|
|
73
79
|
|
|
74
80
|
### Benchmarking Lua Scripts
|
|
75
81
|
|
|
76
82
|
```shell
|
|
77
83
|
redis-cli 'SCRIPT LOAD "return redis.call('\''SET'\'', KEYS[1], ARGV[1])"'
|
|
78
|
-
resp-benchmark "EVALSHA d8f2fad9f8e86a53d2a6ebd960b33c4972cacc37 1 {key uniform 100000} {value 64}"
|
|
84
|
+
resp-benchmark -s 10 "EVALSHA d8f2fad9f8e86a53d2a6ebd960b33c4972cacc37 1 {key uniform 100000} {value 64}"
|
|
79
85
|
```
|
|
80
86
|
|
|
81
87
|
## Differences with redis-benchmark
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
resp_benchmark-0.1.6.dist-info/METADATA,sha256=Smbxo99aEpG-IwuhTd7x-4G1i0psPLN2YuH9epu_3xI,4321
|
|
2
|
+
resp_benchmark-0.1.6.dist-info/WHEEL,sha256=BLCfPl6YSM4208J6gqEXgFfAtBtkE4N1skPZb7TjKwo,129
|
|
3
|
+
resp_benchmark-0.1.6.dist-info/entry_points.txt,sha256=q1llaLwyhHn2jvpR28wBbila30DyZ1B5_4ackdlZ2R4,57
|
|
4
|
+
resp_benchmark-0.1.6.dist-info/license_files/LICENSE,sha256=Kj-yFXYfT2SMHVx80nmX0ta2SPNqCQAq1_fwhkPqJrw,1072
|
|
5
|
+
resp_benchmark/cli.py,sha256=Jj8DrtXVd85oo_nySbpXnYDgpEbIIjM-qUWco0v8Pjk,2498
|
|
6
|
+
resp_benchmark/cores.py,sha256=bSEaHXJYo6spGIK_j-beTz8qbun3D7bgYrYxjUaMuDw,619
|
|
7
|
+
resp_benchmark/__init__.py,sha256=-7qaTnVRokIpURaFVsO6ZP-l7oeHLbsNsGwBLvZrU14,39
|
|
8
|
+
resp_benchmark/wrapper.py,sha256=1pY5UAM48DzmfBFHVxuIk8GW43WKS7ByH3kKvpYX0rc,4629
|
|
9
|
+
resp_benchmark/_resp_benchmark_rust_lib.cpython-310-arm-linux-gnueabihf.so,sha256=tzPuTtqHi_b5k7xlNglGdkwbEM-26LQxIT4ROZNImSM,2817276
|
|
10
|
+
resp_benchmark-0.1.6.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
resp_benchmark-0.1.4.dist-info/METADATA,sha256=hI-JDpfhURuiv6A-_1gE0zTOqI83ejizjoHxNCej0Bg,3689
|
|
2
|
-
resp_benchmark-0.1.4.dist-info/WHEEL,sha256=BLCfPl6YSM4208J6gqEXgFfAtBtkE4N1skPZb7TjKwo,129
|
|
3
|
-
resp_benchmark-0.1.4.dist-info/entry_points.txt,sha256=q1llaLwyhHn2jvpR28wBbila30DyZ1B5_4ackdlZ2R4,57
|
|
4
|
-
resp_benchmark-0.1.4.dist-info/license_files/LICENSE,sha256=Kj-yFXYfT2SMHVx80nmX0ta2SPNqCQAq1_fwhkPqJrw,1072
|
|
5
|
-
resp_benchmark/cli.py,sha256=W6JBss-Kp8FTCtZlOMhCPbu8zwfTC2Tjt_rvI27MgLI,2472
|
|
6
|
-
resp_benchmark/cores.py,sha256=bSEaHXJYo6spGIK_j-beTz8qbun3D7bgYrYxjUaMuDw,619
|
|
7
|
-
resp_benchmark/__init__.py,sha256=OOBd56yvhxbQsxUHzl5nRzCx1z_1gBJkxehUpSBOFuY,52
|
|
8
|
-
resp_benchmark/wrapper.py,sha256=c2NI2erCEWcPADy8hJ3VYzqvRQlZ-0p--YBrcuKbxI4,5609
|
|
9
|
-
resp_benchmark/_resp_benchmark_rust_lib.cpython-310-arm-linux-gnueabihf.so,sha256=ZMxrdaL7q6wI07v2yNUPZzvJJthXOt-DEQfxiZKn-7k,2814288
|
|
10
|
-
resp_benchmark-0.1.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|