Skip to content

Commit 6389bd5

Browse files
committed
Parameterise sync-gateway commands
- also add default ycsb workload path to workload a Change-Id: I812577cda4cd1805367b22250cfd8fdeae388838 Reviewed-on: https://review.couchbase.org/c/perfrunner/+/191025 Tested-by: Build Bot <[email protected]> Reviewed-by: Dragos Petru Taraban <[email protected]>
1 parent 41efbfd commit 6389bd5

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

perfrunner/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,7 @@ class PhaseSettings:
11431143
CONNSTR_PARAMS = "{'ipv6': 'allow', 'enable_tracing': 'false'}"
11441144

11451145
YCSB_CLIENT = 'couchbase2'
1146+
YCSB_DEFAULT_WORKLOAD_PATH = 'workloads/workloada'
11461147

11471148
DURABILITY = None
11481149

@@ -1329,7 +1330,7 @@ def __init__(self, options: dict):
13291330
self.syncgateway_settings = None
13301331

13311332
# YCSB settings
1332-
self.workload_path = options.get('workload_path')
1333+
self.workload_path = options.get('workload_path', self.YCSB_DEFAULT_WORKLOAD_PATH)
13331334
self.recorded_load_cache_size = int(options.get('recorded_load_cache_size',
13341335
self.RECORDED_LOAD_CACHE_SIZE))
13351336
self.inserts_per_workerinstance = int(options.get('inserts_per_workerinstance',

perfrunner/workloads/syncgateway.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
"-p syncgateway.retrydelay={retry_interval} " \
309309
"-p syncgateway.grantaccessinscan={grant_access_in_scan}"
310310

311-
E2E_CB_MULTI_LOAD_DOCS_CMD = " load couchbase2 -s -P workloads/syncgateway_blank " \
311+
E2E_CB_MULTI_LOAD_DOCS_CMD = " load {ycsb_command} -s -P {workload} " \
312312
"-p requestdistribution=sequential " \
313313
"-p recordcount={total_docs} " \
314314
"-p dataintegrity={data_integrity} " \
@@ -338,7 +338,7 @@
338338
"-p core_workload_insertion_retry_interval={retry_interval} " \
339339
"-p exportfile={exportfile}"
340340

341-
E2E_CB_MULTI_RUN_TEST_CMD = " run couchbase2 -s -P workloads/syncgateway_blank " \
341+
E2E_CB_MULTI_RUN_TEST_CMD = " run {ycsb_command} -s -P {workload} " \
342342
"-p requestdistribution=sequential " \
343343
"-p operationcount={operations} " \
344344
"-p recordcount={total_docs} " \
@@ -1039,7 +1039,8 @@ def syncgateway_e2e_multi_cb_load_docs(
10391039
total_docs += docs
10401040
insert_offset += docs
10411041
params = E2E_CB_MULTI_LOAD_DOCS_CMD.format(
1042-
workload=sgs.workload,
1042+
ycsb_command=workload_settings.ycsb_client,
1043+
workload=workload_settings.workload_path,
10431044
host=cluster.servers[0],
10441045
bucket=target.bucket,
10451046
threads=sgs.threads_per_instance,
@@ -1085,7 +1086,8 @@ def syncgateway_e2e_multi_cb_run_test(
10851086
total_docs += docs
10861087
insert_offset += docs
10871088
params = E2E_CB_MULTI_RUN_TEST_CMD.format(
1088-
workload=sgs.workload,
1089+
ycsb_command=workload_settings.ycsb_client,
1090+
workload=workload_settings.workload_path,
10891091
host=cluster.servers[0],
10901092
bucket=target.bucket,
10911093
threads=sgs.threads_per_instance,

0 commit comments

Comments
 (0)