wfcommons.wfgen
wfcommons.wfgen.generator
- class wfcommons.wfgen.generator.WorkflowGenerator(workflow_recipe: WorkflowRecipe, logger: Logger | None = None)
Bases:
object
A generator of synthetic workflow instances based on workflow recipes obtained from the analysis of real workflow execution instances.
- Parameters:
workflow_recipe (WorkflowRecipe) – The workflow recipe to be used for this generator.
logger (Optional[Logger]) – The logger where to log information/warning or errors (optional).
- build_workflow(workflow_name: str | None = None) Workflow
Generate a synthetic workflow instance based on the workflow recipe used to instantiate the generator.
- Parameters:
workflow_name (Optional[str]) – The workflow name.
- Returns:
A synthetic workflow instance object.
- Return type:
- build_workflows(num_workflows: int) List[Workflow]
Generate a number of synthetic workflow instances based on the workflow recipe used to instantiate the generator.
- Parameters:
num_workflows (int) – The number of workflows to be generated.
- Returns:
A list of synthetic workflow instance objects.
- Return type:
List[Workflow]