Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

parse the parameter 'disk_num_per_client' more flexibly #253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarking/mod/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def testjob_distribution(self, disk_num_per_client, instance_list):
client_num = 0
self.cluster["testjob_distribution"] = {}
for client in self.cluster["client"]:
vclient_total = int(disk_num_per_client[client_num])
vclient_total = int(disk_num_per_client[client_num]) if client_num < len(disk_num_per_client) else int(disk_num_per_client[-1])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking to make this code in config level, to check if on specify one number in disk_num_per_client, and make as client-number list in configuration.
Not hack in codes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let me see ~

end_vclient_num = start_vclient_num + vclient_total
self.cluster["testjob_distribution"][client] = copy.deepcopy(instance_list[start_vclient_num:end_vclient_num])
start_vclient_num = end_vclient_num
Expand Down