Skip to content

Commit 4389831

Browse files
committed
renaming trace to instance
1 parent ec6e892 commit 4389831

32 files changed

Lines changed: 292 additions & 292 deletions

docs/source/analyzing_instances.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ WfCommons project, an instance is represented in a JSON file following the
3030
schema described in :ref:`json-format-label`. This Python package
3131
provides an *instance loader* tool for importing workflow execution instances
3232
for analysis. For instance, the code snippet below shows how an instance can
33-
be loaded using the :class:`~wfcommons.trace.trace.Trace` class: ::
33+
be loaded using the :class:`~wfcommons.wfinstances.instance.Instance` class: ::
3434

35-
from wfcommons import Trace
36-
trace = Trace(input_trace='/path/to/instance/file.json')
35+
from wfcommons import Instance
36+
instance = Instance(input_instance='/path/to/instance/file.json')
3737

38-
The :class:`~wfcommons.trace.trace.Trace` class provides a number of
38+
The :class:`~wfcommons.wfinstances.instance.Instance` class provides a number of
3939
methods for interacting with the workflow instance, including:
4040

41-
- :meth:`~wfcommons.trace.trace.Trace.draw`: produces an image or a pdf file representing the instance.
42-
- :meth:`~wfcommons.trace.trace.Trace.leaves`: gets the leaves of the workflow (i.e., the tasks without any successors).
43-
- :meth:`~wfcommons.trace.trace.Trace.roots`: gets the roots of the workflow (i.e., the tasks without any predecessors).
44-
- :meth:`~wfcommons.trace.trace.Trace.write_dot`: writes a dot file of the instance.
41+
- :meth:`~wfcommons.wfinstances.instance.Instance.draw`: produces an image or a pdf file representing the instance.
42+
- :meth:`~wfcommons.wfinstances.instance.Instance.leaves`: gets the leaves of the workflow (i.e., the tasks without any successors).
43+
- :meth:`~wfcommons.wfinstances.instance.Instance.roots`: gets the roots of the workflow (i.e., the tasks without any predecessors).
44+
- :meth:`~wfcommons.wfinstances.instance.Instance.write_dot`: writes a dot file of the instance.
4545

4646
.. note::
4747
Although the analysis methods are inherently used by WfCommons (specifically
@@ -51,25 +51,25 @@ methods for interacting with the workflow instance, including:
5151
The Instance Analyzer
5252
---------------------
5353

54-
The :class:`~wfcommons.trace.trace_analyzer.TraceAnalyzer` class provides
54+
The :class:`~wfcommons.wfinstances.instance_analyzer.InstanceAnalyzer` class provides
5555
a number of tools for analyzing collection of workflow execution instances. The
56-
goal of the :class:`~wfcommons.trace.trace_analyzer.TraceAnalyzer` is to
56+
goal of the :class:`~wfcommons.wfinstances.instance_analyzer.InstanceAnalyzer` is to
5757
perform analyzes of one or multiple workflow execution instances, and build
5858
summaries of the analyzes per workflow' task type prefix.
5959

6060
.. warning::
6161

6262
Although any workflow execution instance represented as a
63-
:class:`~wfcommons.trace.trace.Trace` object (i.e., compatible with
63+
:class:`~wfcommons.wfinstances.instance.Instance` object (i.e., compatible with
6464
:ref:`json-format-label`) can be appended to the
65-
:class:`~wfcommons.trace.trace_analyzer.TraceAnalyzer`, we strongly
65+
:class:`~wfcommons.wfinstances.instance_analyzer.InstanceAnalyzer`, we strongly
6666
recommend that only instances of a single workflow application type be
6767
appended to an analyzer object. You may though create several analyzer
6868
objects per workflow application.
6969

70-
The :meth:`~wfcommons.trace.trace_analyzer.TraceAnalyzer.append_trace` method
70+
The :meth:`~wfcommons.wfinstances.instance_analyzer.InstanceAnalyzer.append_instance` method
7171
allows you to include instances for analysis. The
72-
:meth:`~wfcommons.trace.trace_analyzer.TraceAnalyzer.build_summary` method
72+
:meth:`~wfcommons.wfinstances.instance_analyzer.InstanceAnalyzer.build_summary` method
7373
processes all appended instances. The method applies probability distributions fitting
7474
to a series of data to find the *best* (i.e., minimizes the mean square error)
7575
probability distribution that represents the analyzed data. The method returns
@@ -101,8 +101,8 @@ in which themselves are used to :ref:`generate realistic synthetic workflow inst
101101
<generating-workflows-label>`.
102102

103103
Probability distribution fits can also be plotted by using the
104-
:meth:`~wfcommons.trace.trace_analyzer.TraceAnalyzer.generate_fit_plots` or
105-
:meth:`~wfcommons.trace.trace_analyzer.TraceAnalyzer.generate_all_fit_plots`
104+
:meth:`~wfcommons.wfinstances.instance_analyzer.InstanceAnalyzer.generate_fit_plots` or
105+
:meth:`~wfcommons.wfinstances.instance_analyzer.InstanceAnalyzer.generate_all_fit_plots`
106106
methods -- plots will be saved as :code:`png` files.
107107

108108
Examples
@@ -115,7 +115,7 @@ distribution fitting for task *prefixes* of the Seismology workflow
115115
plots (runtime, and input and output files) into the :code:`fits` folder using
116116
:code:`seismology` as a prefix for each generated plot: ::
117117

118-
from wfcommons import Trace, TraceAnalyzer
118+
from wfcommons import Instance, InstanceAnalyzer
119119
from os import listdir
120120
from os.path import isfile, join
121121

@@ -124,12 +124,12 @@ plots (runtime, and input and output files) into the :code:`fits` folder using
124124
instance_files = [f for f in listdir(INSTANCES_PATH) if isfile(join(INSTANCES_PATH, f))]
125125

126126
# creating the instance analyzer object
127-
analyzer = TraceAnalyzer()
127+
analyzer = InstanceAnalyzer()
128128

129129
# appending instance files to the instance analyzer
130130
for instance_file in instance_files:
131-
instance = Trace(input_trace=INSTANCES_PATH + instance_file)
132-
analyzer.append_trace(instance)
131+
instance = Instance(input_instance=INSTANCES_PATH + instance_file)
132+
analyzer.append_instance(instance)
133133

134134
# list of workflow task name prefixes to be analyzed in each instance
135135
workflow_tasks = ['sG1IterDecon', 'wrapper_siftSTFByMisfit']

docs/source/dev_api_reference.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Developer API Reference
33

44
The developer API reference targets developers and researchers who
55
want to contribute to the WfCommons project by, for example,
6-
developing novel techniques for trace analysis, developing new
6+
developing novel techniques for instance analysis, developing new
77
:ref:`workflow recipes <workflow-recipe-label>`, etc.
88
The developer API reference documentation includes detailed information
99
for interacting with all classes and methods that compose this
@@ -14,6 +14,6 @@ Python package.
1414
:maxdepth: 1
1515

1616
dev_api_wfcommons.rst
17-
dev_api_trace.rst
1817
dev_api_wfchef.rst
1918
dev_api_wfgen.rst
19+
dev_api_wfinstances.rst

docs/source/dev_api_trace.rst

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
wfcommons.wfinstances
2+
=====================
3+
4+
wfcommons.wfinstances.schema
5+
----------------------------
6+
7+
.. automodule:: wfcommons.wfinstances.schema
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
:private-members:
12+
13+
wfcommons.wfinstances.instance
14+
------------------------------
15+
16+
.. automodule:: wfcommons.wfinstances.instance
17+
:members:
18+
:undoc-members:
19+
:show-inheritance:
20+
:private-members:
21+
:noindex:
22+
23+
wfcommons.wfinstances.instance\_analyzer
24+
----------------------------------------
25+
26+
.. automodule:: wfcommons.wfinstances.instance_analyzer
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
:private-members:
31+
:noindex:
32+
33+
wfcommons.wfinstances.logs.abstract\_logs\_parser
34+
-------------------------------------------------
35+
36+
.. automodule:: wfcommons.wfinstances.logs.abstract_logs_parser
37+
:members:
38+
:undoc-members:
39+
:show-inheritance:
40+
:private-members:
41+
:noindex:
42+
43+
wfcommons.wfinstances.logs.makeflow
44+
-----------------------------------
45+
46+
.. automodule:: wfcommons.wfinstances.logs.makeflow
47+
:members:
48+
:undoc-members:
49+
:show-inheritance:
50+
:private-members:
51+
:noindex:
52+
53+
wfcommons.wfinstances.logs.pegasus
54+
----------------------------------
55+
56+
.. automodule:: wfcommons.wfinstances.logs.pegasus
57+
:members:
58+
:undoc-members:
59+
:show-inheritance:
60+
:private-members:
61+
:noindex:

docs/source/parsing_logs.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ The parsers provided in this Python package automatically scans execution logs
1010
to produce instances using :ref:`json-format-label`.
1111

1212
Each parser class is derived from the abstract
13-
:class:`~wfcommons.trace.logs.abstract_logs_parser.LogsParser` class. Thus, each
13+
:class:`~wfcommons.wfinstances.logs.abstract_logs_parser.LogsParser` class. Thus, each
1414
parser provides a
15-
:meth:`~wfcommons.trace.logs.abstract_logs_parser.LogsParser.build_workflow`
15+
:meth:`~wfcommons.wfinstances.logs.abstract_logs_parser.LogsParser.build_workflow`
1616
method.
1717

1818
Makeflow
@@ -30,9 +30,9 @@ campus clusters, the Open Science Grid, NSF XSEDE machines, NCSA Blue Waters, an
3030
Amazon Web Services. Makeflow logs provide time-stamped event instances from these
3131
executions. The following example shows the analysis of Makeflow execution logs,
3232
stored in a local folder (execution dir), for a workflow execution using the
33-
:class:`~wfcommons.trace.logs.makeflow.MakeflowLogsParser` class: ::
33+
:class:`~wfcommons.wfinstances.logs.makeflow.MakeflowLogsParser` class: ::
3434

35-
from wfcommons.trace import MakeflowLogsParser
35+
from wfcommons.wfinstances import MakeflowLogsParser
3636

3737
# creating the parser for the Makeflow workflow
3838
parser = MakeflowLogsParser(execution_dir='/path/to/makeflow/execution/dir/blast/chameleon-small-001/'
@@ -45,7 +45,7 @@ stored in a local folder (execution dir), for a workflow execution using the
4545
workflow.write_json('workflow.json')
4646

4747
.. note::
48-
The :class:`~wfcommons.trace.logs.makeflow.MakeflowLogsParser` class requires
48+
The :class:`~wfcommons.wfinstances.logs.makeflow.MakeflowLogsParser` class requires
4949
that Makeflow workflows to run with the
5050
`Resource Monitor <https://cctools.readthedocs.io/en/latest/resource_monitor/>`_
5151
tool (e.g., execute the workflow using the :code:`--monitor=logs`).
@@ -63,10 +63,10 @@ DAGMan. Individual workflow tasks are managed by a workload management framework
6363
HTCondor, which supervises task executions on local and remote resources. Pegasus
6464
logs provide time-stamped event instances from these executions. The following example shows
6565
the analysis of Pegasus execution logs, stored in a local folder (submit dir), for a
66-
workflow execution using the :class:`~wfcommons.trace.logs.pegasus.PegasusLogsParser`
66+
workflow execution using the :class:`~wfcommons.wfinstances.logs.pegasus.PegasusLogsParser`
6767
class: ::
6868

69-
from wfcommons.trace import PegasusLogsParser
69+
from wfcommons.wfinstances import PegasusLogsParser
7070

7171
# creating the parser for the Pegasus workflow
7272
parser = PegasusLogsParser(submit_dir='/path/to/pegasus/submit/dir/seismology/chameleon-100p-001/')
@@ -78,7 +78,7 @@ class: ::
7878
workflow.write_json('workflow.json')
7979

8080
.. warning::
81-
By default, the :class:`~wfcommons.trace.logs.pegasus.PegasusLogsParser`
81+
By default, the :class:`~wfcommons.wfinstances.logs.pegasus.PegasusLogsParser`
8282
class assumes that the submit dir is from a Pegasus execution with **version 5.0**
8383
or later. To enable parsing of Pegasus execution logs from version 4.9 or earlier,
8484
the option :code:`legacy=True` should be used.

docs/source/user_api_reference.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ User API Reference
22
******************
33

44
The user API reference targets users who want to use WfCommons Python
5-
package for analyzing traces or generating realistic synthetic workflow
6-
traces, using existing workflow recipes already implemented in this
5+
package for analyzing instances or generating realistic synthetic workflow
6+
instances, using existing workflow recipes already implemented in this
77
Python package. Users are NOT expected to develop new
88
:ref:`workflow recipes <workflow-recipe-label>`.
99

@@ -12,6 +12,6 @@ Python package. Users are NOT expected to develop new
1212
:maxdepth: 1
1313

1414
user_api_common.rst
15-
user_api_trace.rst
1615
user_api_wfchef.rst
1716
user_api_wfgen.rst
17+
user_api_wfinstances.rst

docs/source/user_api_trace.rst

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
wfcommons.wfinstances
2+
=====================
3+
4+
wfcommons.wfinstances.instance
5+
------------------------------
6+
7+
.. automodule:: wfcommons.wfinstances.instance
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
12+
wfcommons.wfinstances.instance\_analyzer
13+
----------------------------------------
14+
15+
.. automodule:: wfcommons.wfinstances.instance_analyzer
16+
:members:
17+
:undoc-members:
18+
:show-inheritance:
19+
20+
wfcommons.wfinstances.logs.makeflow
21+
-----------------------------------
22+
23+
.. automodule:: wfcommons.wfinstances.logs.makeflow
24+
:members:
25+
:undoc-members:
26+
:show-inheritance:
27+
28+
wfcommons.wfinstances.logs.pegasus
29+
----------------------------------
30+
31+
.. automodule:: wfcommons.wfinstances.logs.pegasus
32+
:members:
33+
:undoc-members:
34+
:show-inheritance:

wfcommons/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
from .wfchef.recipes import BlastRecipe, BwaRecipe, CyclesRecipe, EpigenomicsRecipe, GenomeRecipe, MontageRecipe, \
1919
SeismologyRecipe, SoykbRecipe, SrasearchRecipe
2020
from .wfgen import WorkflowGenerator
21-
from .trace import Trace, TraceAnalyzer, TraceElement
21+
from .wfinstances import Instance, InstanceAnalyzer, InstanceElement
2222

2323
logging.getLogger('wfcommons').addHandler(logging.NullHandler())

0 commit comments

Comments
 (0)