Skip to content

Commit 508976c

Browse files
Enable pipeline benchmarks on ftsb_redisearch (#9)
* [add] Enable pipeline benchmarks in ftsb_redisearch * [ver] Version bump to 0.1.13
1 parent 75054f0 commit 508976c

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.1.12"
3+
version = "0.1.13"
44
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
55
authors = ["filipecosta90 <filipecosta.90@gmail.com>"]
66
readme = "README.md"

redisbench_admin/run/args.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ def create_run_arguments(parser):
1414
help='one of docker-oss,docker-oss-cluster,docker-enterprise,oss,oss-cluster,enterprise')
1515
parser.add_argument('--deployment-shards', type=int, default=1,
1616
help='number of database shards used in the deployment')
17+
parser.add_argument('--pipeline', type=int, default=1,
18+
help='pipeline requests to Redis')
1719
parser.add_argument('--output-file-prefix', type=str, default="", help='prefix to quickly tag some files')
1820
return parser

redisbench_admin/run/ftsb_redisearch/ftsb_redisearch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@ def get_run_options():
3333

3434

3535
def run_ftsb_redisearch(redis_url, ftsb_redisearch_path, setup_run_json_output_fullpath, options, input_file,
36-
workers=1,args=[]):
36+
workers=1,pipeline=1,args=[]):
3737
##################
3838
# Setup commands #
3939
##################
4040
output_json = None
4141
ftsb_args = []
4242
ftsb_args += [ftsb_redisearch_path, "--host={}".format(redis_url),
4343
"--input={}".format(input_file), "--workers={}".format(workers),
44+
"--pipeline={}".format(pipeline),
4445
"--json-out-file={}".format(setup_run_json_output_fullpath)]
4546
ftsb_process = subprocess.Popen(args=ftsb_args, **options)
4647
if ftsb_process.poll() is not None:

redisbench_admin/run/run.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def run_command_logic(args):
2525

2626
local_path = os.path.abspath(args.local_dir)
2727
workers = args.workers
28+
pipeline = args.pipeline
2829
benchmark_machine_info = cpuinfo.get_cpu_info()
2930
total_cores = benchmark_machine_info['count']
3031
benchmark_infra = {"total-benchmark-machines": 0, "benchmark-machines": {}, "total-db-machines": 0,
@@ -35,6 +36,10 @@ def run_command_logic(args):
3536
if workers == 0:
3637
print('Setting number of workers equal to machine VCPUs {}'.format(total_cores))
3738
workers = total_cores
39+
else:
40+
print('Setting number of workers to {}'.format(workers))
41+
42+
print('Setting pipeline to {}'.format(pipeline))
3843

3944
deployment_type = args.deployment_type
4045
config_filename = args.benchmark_config_file
@@ -120,7 +125,7 @@ def run_command_logic(args):
120125
benchmark_output_dict["setup"][setup_run_key] = run_ftsb_redisearch(args.redis_url,
121126
benchmark_tool_path,
122127
setup_run_json_output_fullpath,
123-
options, input_file, workers)
128+
options, input_file, workers, pipeline)
124129
progress.update()
125130

126131
######################
@@ -133,7 +138,7 @@ def run_command_logic(args):
133138
benchmark_output_dict["benchmark"][benchmark_run_key] = run_ftsb_redisearch(args.redis_url,
134139
benchmark_tool_path,
135140
benchmark_run_json_output_fullpath,
136-
options, input_file, workers)
141+
options, input_file, workers, pipeline)
137142

138143
if benchmark_repetitions_require_teardown is True or repetition == args.repetitions:
139144
print("Running tear down steps...")

0 commit comments

Comments
 (0)