redisbench-admin 0.10.24__py3-none-any.whl → 0.10.26__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_local/args.py +12 -2
- redisbench_admin/run_local/local_db.py +69 -67
- redisbench_admin/run_local/run_local.py +1 -1
- {redisbench_admin-0.10.24.dist-info → redisbench_admin-0.10.26.dist-info}/METADATA +1 -1
- {redisbench_admin-0.10.24.dist-info → redisbench_admin-0.10.26.dist-info}/RECORD +8 -8
- {redisbench_admin-0.10.24.dist-info → redisbench_admin-0.10.26.dist-info}/LICENSE +0 -0
- {redisbench_admin-0.10.24.dist-info → redisbench_admin-0.10.26.dist-info}/WHEEL +0 -0
- {redisbench_admin-0.10.24.dist-info → redisbench_admin-0.10.26.dist-info}/entry_points.txt +0 -0
|
@@ -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("REDIS_PORT", "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,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: redisbench-admin
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.26
|
|
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
|
|
@@ -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=VkIDvdTW-cRl-ncOkcK8-8MdCbq-qyipGQFugh9Fio0,1393
|
|
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.26.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
|
|
239
|
+
redisbench_admin-0.10.26.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
|
|
240
|
+
redisbench_admin-0.10.26.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
|
|
241
|
+
redisbench_admin-0.10.26.dist-info/METADATA,sha256=bkAjdxqypmwO-qqpp6BZEChgUS4BGAUbX-Mb6f5EHCY,5336
|
|
242
|
+
redisbench_admin-0.10.26.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|