@@ -30,18 +30,18 @@ WfCommons project, an instance is represented in a JSON file following the
3030schema described in :ref: `json-format-label `. This Python package
3131provides an *instance loader * tool for importing workflow execution instances
3232for 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
3939methods 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:
5151The Instance Analyzer
5252---------------------
5353
54- The :class: `~wfcommons.trace.trace_analyzer.TraceAnalyzer ` class provides
54+ The :class: `~wfcommons.wfinstances.instance_analyzer.InstanceAnalyzer ` class provides
5555a 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
5757perform analyzes of one or multiple workflow execution instances, and build
5858summaries 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
7171allows 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
7373processes all appended instances. The method applies probability distributions fitting
7474to a series of data to find the *best * (i.e., minimizes the mean square error)
7575probability 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
103103Probability 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 `
106106methods -- plots will be saved as :code: `png ` files.
107107
108108Examples
@@ -115,7 +115,7 @@ distribution fitting for task *prefixes* of the Seismology workflow
115115plots (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']
0 commit comments