Skip to content

Commit

Permalink
Merge pull request #36 from ftschirpke/feature/benchmark_from_synthet…
Browse files Browse the repository at this point in the history
…ic_workflow

Create Benchmarks from Synthetic Workflow Instances
  • Loading branch information
rafaelfsilva committed Jan 9, 2024
2 parents c883bb9 + 43ca19d commit 71fb4c2
Show file tree
Hide file tree
Showing 3 changed files with 309 additions and 64 deletions.
22 changes: 21 additions & 1 deletion docs/source/generating_workflow_benchmarks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,33 @@ values for the parameters of the workflow task benchmark can be specified:
- :code:`percent_cpu`: The fraction of the computation's instructions that
correspond to non-memory operations.

Generate from synthetic workflow instances
++++++++++++++++++++++++++++++++++++++++++

WfCommons also allows you to convert synthetic workflow instances into benchmarks directly.
The generated benchmark will have exactly the same structure as the synthetic workflow instance.

import pathlib

from wfcommons import BlastRecipe
from wfcommons.wfbench import WorkflowBenchmark

# create a synthetic workflow instance with 500 tasks or use one that you already have
workflow = BlastRecipe.from_num_tasks(500).build_workflow()
# create a workflow benchmark object to generate specifications based on a recipe
benchmark = WorkflowBenchmark(recipe=BlastRecipe, num_tasks=500)
# generate a specification based on performance characteristics and the structure of the synthetic workflow instance
path = benchmark.create_benchmark_from_synthetic_workflow(pathlib.Path("/tmp/"), workflow, cpu_work=100, data=10, percent_cpu=0.6)

This is useful when you want to generate a benchmark with a specific structure or when you want
benchmarks with the more detailed structure provided by WfChef workflow generation.

Translating Specifications into Benchmark Codes
-----------------------------------------------

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

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

0 comments on commit 71fb4c2

Please sign in to comment.