in fiosynth_lib/fiosynth.py [0:0]
def getNumJobs(data, command, dut):
# getNumJobs checks the number of devices in the system and
# subtracts by 1 to avoid counting the boot device if using
# ALL option. If using ALLRAID option, it will could the
# number of unique mdraid devices. Number of jobs is used
# to scale fio jobfiles for multiple devices.
if command == "ALL":
jobs = len(data["disk"]) - 1
else:
dev_list = set()
raid = getRaidLevel(data)
for dev in data[raid]:
if checkFileExist(dev, dut) is True:
dev_list.add(dev)
jobs = len(dev_list)
return jobs