Skip to content

Commit 724a009

Browse files
authored
Merge pull request #329 from harriscr/ch_wip_script
Adding an option for a pre-workload script that is run before the IO exerciser
2 parents da1706c + 5ff4984 commit 724a009

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

benchmark/librbdfio.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@ def run_workloads(self):
174174
f'iodepth-{int(self.iodepth):03d}/numjobs-{int(self.numjobs):03d}' )
175175
common.make_remote_dir(self.run_dir)
176176

177+
# If there is a script to run specified in the yaml for this workload
178+
# then add it to the process list before the actual test
179+
script_command: str = test.get("pre_workload_script", "")
180+
if script_command != "":
181+
logger.debug("Scheduling script %s to run before this workolad", script_command)
182+
script_process = common.pdsh(settings.getnodes("clients"), script_command)
183+
script_process.wait()
184+
177185
for i in range(self.volumes_per_client):
178186
fio_cmd = self.mkfiocmd(i)
179187
p = common.pdsh(settings.getnodes('clients'), fio_cmd)

0 commit comments

Comments
 (0)