wfcommons.wfgen
wfcommons.wfgen.generator
- class wfcommons.wfgen.generator.WorkflowGenerator(workflow_recipe: wfcommons.wfgen.abstract_recipe.WorkflowRecipe, logger: Optional[logging.Logger] = 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: Optional[str] = None) wfcommons.common.workflow.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[wfcommons.common.workflow.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]