redisbench-admin 0.10.23__py3-none-any.whl → 0.10.25__py3-none-any.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.
- redisbench_admin/run/common.py +7 -0
- redisbench_admin/run_local/args.py +12 -2
- redisbench_admin/run_local/local_db.py +69 -67
- redisbench_admin/run_local/run_local.py +23 -1
- {redisbench_admin-0.10.23.dist-info → redisbench_admin-0.10.25.dist-info}/METADATA +1 -1
- {redisbench_admin-0.10.23.dist-info → redisbench_admin-0.10.25.dist-info}/RECORD +9 -9
- {redisbench_admin-0.10.23.dist-info → redisbench_admin-0.10.25.dist-info}/LICENSE +0 -0
- {redisbench_admin-0.10.23.dist-info → redisbench_admin-0.10.25.dist-info}/WHEEL +0 -0
- {redisbench_admin-0.10.23.dist-info → redisbench_admin-0.10.25.dist-info}/entry_points.txt +0 -0
redisbench_admin/run/common.py
CHANGED
|
@@ -699,6 +699,8 @@ def print_results_table_stdout(
|
|
|
699
699
|
setup_name,
|
|
700
700
|
test_name,
|
|
701
701
|
cpu_usage=None,
|
|
702
|
+
kv_overall={},
|
|
703
|
+
metric_names=[],
|
|
702
704
|
):
|
|
703
705
|
# check which metrics to extract
|
|
704
706
|
(_, metrics,) = merge_default_and_config_metrics(
|
|
@@ -714,6 +716,11 @@ def print_results_table_stdout(
|
|
|
714
716
|
results_matrix = extract_results_table(metrics, results_dict)
|
|
715
717
|
if cpu_usage is not None:
|
|
716
718
|
results_matrix.append(["Total shards CPU usage %", "", "", cpu_usage])
|
|
719
|
+
for metric_name in metric_names:
|
|
720
|
+
if metric_name in kv_overall:
|
|
721
|
+
metric_value = kv_overall[metric_name]
|
|
722
|
+
results_matrix.append([f"Total shards {metric_name}", "", "", metric_value])
|
|
723
|
+
|
|
717
724
|
results_matrix = [[x[0], "{:.3f}".format(x[3])] for x in results_matrix]
|
|
718
725
|
writer = MarkdownTableWriter(
|
|
719
726
|
table_name=table_name,
|
|
@@ -8,13 +8,17 @@ import os
|
|
|
8
8
|
from redisbench_admin.run.args import common_run_args
|
|
9
9
|
from redisbench_admin.run.common import REDIS_BINARY
|
|
10
10
|
|
|
11
|
-
FLUSHALL_AT_START = bool(int(os.getenv("FLUSHALL_AT_START", "
|
|
11
|
+
FLUSHALL_AT_START = bool(int(os.getenv("FLUSHALL_AT_START", "1")))
|
|
12
12
|
IGNORE_KEYSPACE_ERRORS = bool(int(os.getenv("IGNORE_KEYSPACE_ERRORS", "0")))
|
|
13
|
+
SKIP_REDIS_SPIN = bool(int(os.getenv("SKIP_REDIS_SPIN", "0")))
|
|
14
|
+
REDIS_PORT = int(os.getenv("SKIP_REDIS_SPIN", "6379"))
|
|
15
|
+
REDIS_HOST = os.getenv("REDIS_HOST", "127.0.0.1")
|
|
13
16
|
|
|
14
17
|
|
|
15
18
|
def create_run_local_arguments(parser):
|
|
16
19
|
parser = common_run_args(parser)
|
|
17
|
-
parser.add_argument("--port", type=int, default=
|
|
20
|
+
parser.add_argument("--port", type=int, default=REDIS_PORT)
|
|
21
|
+
parser.add_argument("--host", type=str, default=REDIS_HOST)
|
|
18
22
|
parser.add_argument("--redis-binary", type=str, default=REDIS_BINARY)
|
|
19
23
|
parser.add_argument(
|
|
20
24
|
"--flushall_on_every_test_start",
|
|
@@ -22,6 +26,12 @@ def create_run_local_arguments(parser):
|
|
|
22
26
|
default=FLUSHALL_AT_START,
|
|
23
27
|
help="At the start of every test send a FLUSHALL",
|
|
24
28
|
)
|
|
29
|
+
parser.add_argument(
|
|
30
|
+
"--skip-redis-spin",
|
|
31
|
+
type=bool,
|
|
32
|
+
default=SKIP_REDIS_SPIN,
|
|
33
|
+
help="Skip redis spin. consider redis alive at host:port",
|
|
34
|
+
)
|
|
25
35
|
parser.add_argument(
|
|
26
36
|
"--ignore_keyspace_errors",
|
|
27
37
|
type=bool,
|
|
@@ -79,84 +79,86 @@ def local_db_spin(
|
|
|
79
79
|
redis_processes,
|
|
80
80
|
)
|
|
81
81
|
else:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"Using local temporary dir to spin up Redis Instance. Path: {}".format(
|
|
87
|
-
temporary_dir
|
|
88
|
-
)
|
|
89
|
-
)
|
|
90
|
-
if dbdir_folder is not None:
|
|
91
|
-
from distutils.dir_util import copy_tree
|
|
92
|
-
|
|
93
|
-
copy_tree(dbdir_folder, temporary_dir)
|
|
82
|
+
if args.skip_redis_spin is False:
|
|
83
|
+
# setup Redis
|
|
84
|
+
# copy the rdb to DB machine
|
|
85
|
+
redis_7 = args.redis_7
|
|
94
86
|
logging.info(
|
|
95
|
-
"
|
|
96
|
-
|
|
87
|
+
"Using local temporary dir to spin up Redis Instance. Path: {}".format(
|
|
88
|
+
temporary_dir
|
|
97
89
|
)
|
|
98
90
|
)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
_,
|
|
102
|
-
redis_configuration_parameters,
|
|
103
|
-
dataset_load_timeout_secs,
|
|
104
|
-
modules_configuration_parameters_map,
|
|
105
|
-
) = extract_redis_dbconfig_parameters(benchmark_config, "dbconfig")
|
|
91
|
+
if dbdir_folder is not None:
|
|
92
|
+
from distutils.dir_util import copy_tree
|
|
106
93
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
redis_processes, redis_conns = spin_up_local_redis_cluster(
|
|
117
|
-
binary,
|
|
118
|
-
temporary_dir,
|
|
119
|
-
shard_count,
|
|
120
|
-
shard_host,
|
|
121
|
-
args.port,
|
|
122
|
-
local_module_file,
|
|
94
|
+
copy_tree(dbdir_folder, temporary_dir)
|
|
95
|
+
logging.info(
|
|
96
|
+
"Copied entire content of {} into temporary path: {}".format(
|
|
97
|
+
dbdir_folder, temporary_dir
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
(
|
|
101
|
+
_,
|
|
102
|
+
_,
|
|
123
103
|
redis_configuration_parameters,
|
|
124
104
|
dataset_load_timeout_secs,
|
|
125
105
|
modules_configuration_parameters_map,
|
|
126
|
-
|
|
127
|
-
)
|
|
106
|
+
) = extract_redis_dbconfig_parameters(benchmark_config, "dbconfig")
|
|
128
107
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
raise Exception("Redis cluster setup failed. Failing test.")
|
|
134
|
-
|
|
135
|
-
if setup_type == "oss-standalone":
|
|
136
|
-
redis_processes = spin_up_local_redis(
|
|
137
|
-
binary,
|
|
138
|
-
args.port,
|
|
139
|
-
temporary_dir,
|
|
140
|
-
local_module_file,
|
|
141
|
-
redis_configuration_parameters,
|
|
142
|
-
dbdir_folder,
|
|
143
|
-
dataset_load_timeout_secs,
|
|
144
|
-
modules_configuration_parameters_map,
|
|
145
|
-
redis_7,
|
|
108
|
+
logging.info(
|
|
109
|
+
"Using a dataset load timeout of {} seconds.".format(
|
|
110
|
+
dataset_load_timeout_secs
|
|
111
|
+
)
|
|
146
112
|
)
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
113
|
+
|
|
114
|
+
if setup_type == "oss-cluster":
|
|
115
|
+
cluster_api_enabled = True
|
|
116
|
+
redis_processes, redis_conns = spin_up_local_redis_cluster(
|
|
117
|
+
binary,
|
|
118
|
+
temporary_dir,
|
|
119
|
+
shard_count,
|
|
120
|
+
args.host,
|
|
121
|
+
args.port,
|
|
122
|
+
local_module_file,
|
|
123
|
+
redis_configuration_parameters,
|
|
124
|
+
dataset_load_timeout_secs,
|
|
125
|
+
modules_configuration_parameters_map,
|
|
126
|
+
redis_7,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
status = setup_redis_cluster_from_conns(
|
|
130
|
+
redis_conns, shard_count, args.host, args.port
|
|
131
|
+
)
|
|
132
|
+
if status is False:
|
|
133
|
+
raise Exception("Redis cluster setup failed. Failing test.")
|
|
134
|
+
|
|
135
|
+
if setup_type == "oss-standalone":
|
|
136
|
+
redis_processes = spin_up_local_redis(
|
|
137
|
+
binary,
|
|
138
|
+
args.port,
|
|
139
|
+
temporary_dir,
|
|
140
|
+
local_module_file,
|
|
141
|
+
redis_configuration_parameters,
|
|
142
|
+
dbdir_folder,
|
|
143
|
+
dataset_load_timeout_secs,
|
|
144
|
+
modules_configuration_parameters_map,
|
|
145
|
+
redis_7,
|
|
153
146
|
)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
147
|
+
if setup_type == "oss-cluster":
|
|
148
|
+
for shardn, redis_process in enumerate(redis_processes):
|
|
149
|
+
logging.info(
|
|
150
|
+
"Checking if shard #{} process with pid={} is alive".format(
|
|
151
|
+
shardn + 1, redis_process.pid
|
|
152
|
+
)
|
|
153
|
+
)
|
|
154
|
+
if is_process_alive(redis_process) is False:
|
|
155
|
+
raise Exception("Redis process is not alive. Failing test.")
|
|
156
|
+
cluster_init_steps(clusterconfig, redis_conns, local_module_file)
|
|
157
|
+
else:
|
|
158
|
+
logging.info("Skipping DB spin step...")
|
|
157
159
|
|
|
158
160
|
if setup_type == "oss-standalone":
|
|
159
|
-
r = redis.Redis(port=args.port)
|
|
161
|
+
r = redis.Redis(port=args.port, host=args.host)
|
|
160
162
|
r.ping()
|
|
161
163
|
r.client_setname("redisbench-admin-standalone")
|
|
162
164
|
redis_conns.append(r)
|
|
@@ -184,7 +186,7 @@ def local_db_spin(
|
|
|
184
186
|
benchmark_config,
|
|
185
187
|
full_benchmark_path,
|
|
186
188
|
args.port,
|
|
187
|
-
|
|
189
|
+
args.host,
|
|
188
190
|
local_benchmark_output_filename,
|
|
189
191
|
False,
|
|
190
192
|
benchmark_tool_workdir,
|
|
@@ -29,8 +29,10 @@ from redisbench_admin.run.common import (
|
|
|
29
29
|
)
|
|
30
30
|
from redisbench_admin.run.metrics import (
|
|
31
31
|
from_info_to_overall_shard_cpu,
|
|
32
|
+
collect_redis_metrics,
|
|
32
33
|
collect_cpu_data,
|
|
33
34
|
)
|
|
35
|
+
|
|
34
36
|
from redisbench_admin.run.redistimeseries import (
|
|
35
37
|
datasink_profile_tabular_data,
|
|
36
38
|
timeseries_test_sucess_flow,
|
|
@@ -288,7 +290,7 @@ def run_local_command_logic(args, project_name, project_version):
|
|
|
288
290
|
benchmark_config,
|
|
289
291
|
full_benchmark_path,
|
|
290
292
|
args.port,
|
|
291
|
-
|
|
293
|
+
args.host,
|
|
292
294
|
local_benchmark_output_filename,
|
|
293
295
|
False,
|
|
294
296
|
benchmark_tool_workdir,
|
|
@@ -376,6 +378,21 @@ def run_local_command_logic(args, project_name, project_version):
|
|
|
376
378
|
test_name,
|
|
377
379
|
)
|
|
378
380
|
|
|
381
|
+
(
|
|
382
|
+
end_time_ms,
|
|
383
|
+
_,
|
|
384
|
+
overall_end_time_metrics,
|
|
385
|
+
) = collect_redis_metrics(
|
|
386
|
+
redis_conns,
|
|
387
|
+
["memory"],
|
|
388
|
+
{
|
|
389
|
+
"memory": [
|
|
390
|
+
"used_memory",
|
|
391
|
+
"used_memory_dataset",
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
)
|
|
395
|
+
|
|
379
396
|
if (
|
|
380
397
|
profilers_enabled
|
|
381
398
|
and args.push_results_redistimeseries
|
|
@@ -413,6 +430,11 @@ def run_local_command_logic(args, project_name, project_version):
|
|
|
413
430
|
setup_name,
|
|
414
431
|
test_name,
|
|
415
432
|
total_shards_cpu_usage,
|
|
433
|
+
overall_end_time_metrics,
|
|
434
|
+
[
|
|
435
|
+
"memory_used_memory",
|
|
436
|
+
"memory_used_memory_dataset",
|
|
437
|
+
],
|
|
416
438
|
)
|
|
417
439
|
|
|
418
440
|
# check KPIs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: redisbench-admin
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.25
|
|
4
4
|
Summary: Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... ).
|
|
5
5
|
Author: filipecosta90
|
|
6
6
|
Author-email: filipecosta.90@gmail.com
|
|
@@ -176,7 +176,7 @@ redisbench_admin/run/ann/pkg/test/test-jaccard.py,sha256=oIhaQCQKrQokwv3fvgLSwPl
|
|
|
176
176
|
redisbench_admin/run/ann/pkg/test/test-metrics.py,sha256=vJdS8Kuk8bAnpB65Uqb-9rUUI35XrHwaO3cNwKX5gxc,3057
|
|
177
177
|
redisbench_admin/run/args.py,sha256=Sspv4eusQs9HMVMIyv_hB9vQ3S_s0lHYGAL1gPb2WGM,7864
|
|
178
178
|
redisbench_admin/run/cluster.py,sha256=QuptSW-IhdyFIoQ3hzY613jtQWxBrVIlgc8OarcEK20,6072
|
|
179
|
-
redisbench_admin/run/common.py,sha256
|
|
179
|
+
redisbench_admin/run/common.py,sha256=nh21zFSO0uSbYn7whT929W3wcl9Zirx48XbZesOTjQU,25450
|
|
180
180
|
redisbench_admin/run/ftsb/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
181
181
|
redisbench_admin/run/ftsb/ftsb.py,sha256=plP-yxjMvvy-gITlXpuXJcyrPHfDoYYI8JRwTe5kK4M,2388
|
|
182
182
|
redisbench_admin/run/git.py,sha256=6UYGcTN0MPzf4QDVoJnFkou0yZasLF6jLG7f0zoySq8,3064
|
|
@@ -205,11 +205,11 @@ redisbench_admin/run_async/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdU
|
|
|
205
205
|
redisbench_admin/run_async/render_files.py,sha256=OMPy3-GnU14tQ4HNlF5utOnmzpRAXURwG_h8UDkTmYs,2674
|
|
206
206
|
redisbench_admin/run_async/run_async.py,sha256=g2ZOQqj9vXZYaRyNpJZtgfYyY9tMuRmEv3Hh3qWOUs8,14525
|
|
207
207
|
redisbench_admin/run_local/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
208
|
-
redisbench_admin/run_local/args.py,sha256=
|
|
208
|
+
redisbench_admin/run_local/args.py,sha256=wENpejSLBNApnBinJNS5sI0ZCCWVGMUHXLBQzS8NUSA,1398
|
|
209
209
|
redisbench_admin/run_local/local_client.py,sha256=gwawMDOBrf7m--uyxu8kMZC5LBiLjbUBSKvzVOdOAas,124
|
|
210
|
-
redisbench_admin/run_local/local_db.py,sha256=
|
|
210
|
+
redisbench_admin/run_local/local_db.py,sha256=Xh7xyZaSyhmRXKyMsbKqO9aLUikf-EXGha3K1h9yL2M,7396
|
|
211
211
|
redisbench_admin/run_local/local_helpers.py,sha256=JyqLW2-Sbm35BXjxxfOB1yK7ADdLfcVrq08NLNdIwac,7026
|
|
212
|
-
redisbench_admin/run_local/run_local.py,sha256=
|
|
212
|
+
redisbench_admin/run_local/run_local.py,sha256=Kl0yF0VW68a_ydOapxPkSTHD2ET-88YeWsZvUihSH78,24565
|
|
213
213
|
redisbench_admin/run_remote/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
|
|
214
214
|
redisbench_admin/run_remote/args.py,sha256=vhV87avBwXL8c2QLqrAkIyWD53MYhN06F-3wRv3l5xE,3829
|
|
215
215
|
redisbench_admin/run_remote/consts.py,sha256=bCMkwyeBD-EmOpoHKni7LjWy5WuaxGJhGhqpi4AL0RQ,386
|
|
@@ -235,8 +235,8 @@ redisbench_admin/utils/utils.py,sha256=FLDjhGkW0PWwcu_nlTnIW6aZtHzJGz4LIwvu1CpCa
|
|
|
235
235
|
redisbench_admin/watchdog/__init__.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
|
|
236
236
|
redisbench_admin/watchdog/args.py,sha256=nKsG1G6ATOZlAMHMtT9u3kXxduKCbejSZ5x8oB_ynZ8,1312
|
|
237
237
|
redisbench_admin/watchdog/watchdog.py,sha256=jFGtm5ktjKuXKWvH7lnmf3pp-ch1WBJUOomXILJMDAg,6158
|
|
238
|
-
redisbench_admin-0.10.
|
|
239
|
-
redisbench_admin-0.10.
|
|
240
|
-
redisbench_admin-0.10.
|
|
241
|
-
redisbench_admin-0.10.
|
|
242
|
-
redisbench_admin-0.10.
|
|
238
|
+
redisbench_admin-0.10.25.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
|
|
239
|
+
redisbench_admin-0.10.25.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
|
|
240
|
+
redisbench_admin-0.10.25.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
|
|
241
|
+
redisbench_admin-0.10.25.dist-info/METADATA,sha256=FFWnpLj6Ei4eaFxj96622A2snvog6QlSn5IMGAaHhWE,5336
|
|
242
|
+
redisbench_admin-0.10.25.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|