We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2f8312 commit f3d5cc0Copy full SHA for f3d5cc0
1 file changed
wfcommons/wfbench/bench.py
@@ -115,6 +115,15 @@ def create_benchmark_from_synthetic_workflow(
115
json_path = save_dir.joinpath(
116
f"{self.workflow.name.lower()}-{self.num_tasks}").with_suffix(".json")
117
118
+ # if no cpu_work is provided, use the maximum runtime of each task as a reference
119
+ if cpu_work is None:
120
+ cpu_work = {}
121
+ for task in self.workflow.tasks.values():
122
+ if task.category not in cpu_work or task.runtime > cpu_work[task.category]:
123
+ cpu_work[task.category] = task.runtime
124
+ for key in cpu_work.keys():
125
+ cpu_work[key] *= 1000
126
+
127
cores, lock = self._creating_lock_files(lock_files_folder)
128
129
max_runtime = max(task.runtime for task in self.workflow.tasks.values())
0 commit comments