Skip to content

Commit 71fb4c2

Browse files
authored
Merge pull request #36 from ftschirpke/feature/benchmark_from_synthetic_workflow
Create Benchmarks from Synthetic Workflow Instances
2 parents c883bb9 + 43ca19d commit 71fb4c2

3 files changed

Lines changed: 309 additions & 64 deletions

File tree

docs/source/generating_workflow_benchmarks.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,33 @@ values for the parameters of the workflow task benchmark can be specified:
4848
- :code:`percent_cpu`: The fraction of the computation's instructions that
4949
correspond to non-memory operations.
5050

51+
Generate from synthetic workflow instances
52+
++++++++++++++++++++++++++++++++++++++++++
53+
54+
WfCommons also allows you to convert synthetic workflow instances into benchmarks directly.
55+
The generated benchmark will have exactly the same structure as the synthetic workflow instance.
56+
57+
import pathlib
58+
59+
from wfcommons import BlastRecipe
60+
from wfcommons.wfbench import WorkflowBenchmark
61+
62+
# create a synthetic workflow instance with 500 tasks or use one that you already have
63+
workflow = BlastRecipe.from_num_tasks(500).build_workflow()
64+
# create a workflow benchmark object to generate specifications based on a recipe
65+
benchmark = WorkflowBenchmark(recipe=BlastRecipe, num_tasks=500)
66+
# generate a specification based on performance characteristics and the structure of the synthetic workflow instance
67+
path = benchmark.create_benchmark_from_synthetic_workflow(pathlib.Path("/tmp/"), workflow, cpu_work=100, data=10, percent_cpu=0.6)
68+
69+
This is useful when you want to generate a benchmark with a specific structure or when you want
70+
benchmarks with the more detailed structure provided by WfChef workflow generation.
5171

5272
Translating Specifications into Benchmark Codes
5373
-----------------------------------------------
5474

5575
WfCommons provides a collection of translators for executing the benchmarks as actual
5676
workflow applications. Below, we provide illustrative examples on how to generate
57-
workflow benchmakrs for the currently supported workflow systems.
77+
workflow benchmarks for the currently supported workflow systems.
5878

5979
The :class:`~wfcommons.wfbench.translator.abstract_translator.Translator` class is
6080
the foundation for each translator class. This class takes as input either a

0 commit comments

Comments
 (0)