mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-20 09:40:50 +01:00
docs:writing_plugins: Typos and Grammar
This commit is contained in:
parent
1a98b8a4d3
commit
0269a30ca6
@ -62,12 +62,12 @@ context.workload
|
|||||||
:class:`wa.framework.workload` object that is currently being executed.
|
:class:`wa.framework.workload` object that is currently being executed.
|
||||||
|
|
||||||
context.tm
|
context.tm
|
||||||
This is the target manager which can be used to access various information
|
This is the target manager that can be used to access various information
|
||||||
about the target including initialization parameters.
|
about the target including initialization parameters.
|
||||||
|
|
||||||
context.current_job
|
context.current_job
|
||||||
This is an instance of :class:`wa.framework.job.Job` and contains all
|
This is an instance of :class:`wa.framework.job.Job` and contains all
|
||||||
the relevant information to the workload job being currently being executed.
|
the information relevant to the workload job currently being executed.
|
||||||
|
|
||||||
context.current_job.spec
|
context.current_job.spec
|
||||||
The current workload specification being executed. This is an
|
The current workload specification being executed. This is an
|
||||||
@ -99,7 +99,7 @@ possible, as they make your code too dependent on a particular environment and
|
|||||||
may mean having to make adjustments when moving to new (host and/or device)
|
may mean having to make adjustments when moving to new (host and/or device)
|
||||||
platforms. To help avoid hard-coded absolute paths, WA defines a number of
|
platforms. To help avoid hard-coded absolute paths, WA defines a number of
|
||||||
standard locations. You should strive to define your paths relative
|
standard locations. You should strive to define your paths relative
|
||||||
to one of those.
|
to one of these.
|
||||||
|
|
||||||
On the host
|
On the host
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
@ -182,7 +182,7 @@ Metrics can be added to WA output via the context:
|
|||||||
|
|
||||||
You only need to specify the name and the value for the metric. Units and
|
You only need to specify the name and the value for the metric. Units and
|
||||||
classifiers are optional, and, if not specified otherwise, it will be assumed
|
classifiers are optional, and, if not specified otherwise, it will be assumed
|
||||||
that higher values are better.
|
that higher values are better (lower_is_better=False).
|
||||||
|
|
||||||
The metric will be added to the result for the current job, if there is one;
|
The metric will be added to the result for the current job, if there is one;
|
||||||
otherwise, it will be added to the overall run result.
|
otherwise, it will be added to the overall run result.
|
||||||
@ -226,7 +226,7 @@ also helps WA decide how it should be handled. Currently supported kinds are:
|
|||||||
potentially (though unlikely) useful data is greater
|
potentially (though unlikely) useful data is greater
|
||||||
than the time/space cost of handling the artifact (e.g.
|
than the time/space cost of handling the artifact (e.g.
|
||||||
a database uploader may choose to ignore ``raw``
|
a database uploader may choose to ignore ``raw``
|
||||||
artifacts, where as a network filer archiver may choose
|
artifacts, whereas a network filer archiver may choose
|
||||||
to archive them).
|
to archive them).
|
||||||
|
|
||||||
.. note: The kind parameter is intended to represent the logical
|
.. note: The kind parameter is intended to represent the logical
|
||||||
@ -247,7 +247,7 @@ As with :ref:`metrics`, artifacts are added via the context:
|
|||||||
The artifact will be added to the result of the current job, if there is one;
|
The artifact will be added to the result of the current job, if there is one;
|
||||||
otherwise, it will be added to the overall run result. In some situations, you
|
otherwise, it will be added to the overall run result. In some situations, you
|
||||||
may wish to add an artifact to the overall run while being inside a job context,
|
may wish to add an artifact to the overall run while being inside a job context,
|
||||||
this can be done with ``add_run_artifiact``:
|
this can be done with ``add_run_artifact``:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ Metadata
|
|||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
There may be additional data collected by your plugin that you want to record as
|
There may be additional data collected by your plugin that you want to record as
|
||||||
part of the result, but that does not fall with the definition of a "metric".
|
part of the result, but that does not fall under the definition of a "metric".
|
||||||
For example, you may want to record the version of the binary you're executing.
|
For example, you may want to record the version of the binary you're executing.
|
||||||
You can do this by adding a metadata entry:
|
You can do this by adding a metadata entry:
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ If you attempt to add a metadata entry that already exists, an error will be
|
|||||||
raised, unless ``force=True`` is specified, in which case, it will be
|
raised, unless ``force=True`` is specified, in which case, it will be
|
||||||
overwritten.
|
overwritten.
|
||||||
|
|
||||||
Updating an existing entry who's value is a collection can be done with
|
Updating an existing entry whose value is a collection can be done with
|
||||||
``update_metadata``:
|
``update_metadata``:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
@ -378,12 +378,12 @@ An object looking for a resource invokes a resource resolver with an instance of
|
|||||||
getters registered for that resource type in priority order attempting to obtain
|
getters registered for that resource type in priority order attempting to obtain
|
||||||
the resource; once the resource is obtained, it is returned to the calling
|
the resource; once the resource is obtained, it is returned to the calling
|
||||||
object. If none of the registered getters could find the resource,
|
object. If none of the registered getters could find the resource,
|
||||||
``NotFoundError`` is raised (or``None`` is returned instead, if invoked with
|
``NotFoundError`` is raised (or ``None`` is returned instead, if invoked with
|
||||||
``strict=False``).
|
``strict=False``).
|
||||||
|
|
||||||
The most common kind of object looking for resources is a ``Workload``, and the
|
The most common kind of object looking for resources is a ``Workload``, and the
|
||||||
``Workload`` class defines
|
``Workload`` class defines
|
||||||
:py:meth:`wa.framework.workload.Workload.init_resources` method that may be
|
:py:meth:`wa.framework.workload.Workload.init_resources` method, which may be
|
||||||
overridden by subclasses to perform resource resolution. For example, a workload
|
overridden by subclasses to perform resource resolution. For example, a workload
|
||||||
looking for an executable file would do so like this::
|
looking for an executable file would do so like this::
|
||||||
|
|
||||||
@ -976,7 +976,7 @@ away. For example::
|
|||||||
*just* before the workload runs), and it will stopped before all other
|
*just* before the workload runs), and it will stopped before all other
|
||||||
instruments (i.e. *just* after the workload runs).
|
instruments (i.e. *just* after the workload runs).
|
||||||
|
|
||||||
If more than one active instrument have specified fast (or slow) callbacks, then
|
If more than one active instrument has specified fast (or slow) callbacks, then
|
||||||
their execution order with respect to each other is not guaranteed. In general,
|
their execution order with respect to each other is not guaranteed. In general,
|
||||||
having a lot of instruments enabled is going to negatively affect the
|
having a lot of instruments enabled is going to negatively affect the
|
||||||
readings. The best way to ensure accuracy of measurements is to minimize the
|
readings. The best way to ensure accuracy of measurements is to minimize the
|
||||||
@ -1060,8 +1060,8 @@ the following interface::
|
|||||||
The method names should be fairly self-explanatory. The difference between
|
The method names should be fairly self-explanatory. The difference between
|
||||||
"process" and "export" methods is that export methods will be invoked after
|
"process" and "export" methods is that export methods will be invoked after
|
||||||
process methods for all output processors have been generated. Process methods
|
process methods for all output processors have been generated. Process methods
|
||||||
may generated additional artifacts (metrics, files, etc), while export methods
|
may generate additional artifacts (metrics, files, etc.), while export methods
|
||||||
should not -- the should only handle existing results (upload them to a
|
should not -- they should only handle existing results (upload them to a
|
||||||
database, archive on a filer, etc).
|
database, archive on a filer, etc).
|
||||||
|
|
||||||
The output object passed to job methods is an instance of
|
The output object passed to job methods is an instance of
|
||||||
@ -1159,7 +1159,7 @@ directory appropriately::
|
|||||||
Adding a Target
|
Adding a Target
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
In WA3 a 'target' consists of a platform and a devlib target. The
|
In WA3, a 'target' consists of a platform and a devlib target. The
|
||||||
implementations of the targets are located in ``devlib``. WA3 will instantiate a
|
implementations of the targets are located in ``devlib``. WA3 will instantiate a
|
||||||
devlib target passing relevant parameters parsed from the configuration. For
|
devlib target passing relevant parameters parsed from the configuration. For
|
||||||
more information about devlib targets please see `the documentation
|
more information about devlib targets please see `the documentation
|
||||||
@ -1258,5 +1258,3 @@ the package contains plugin and it will load them next time it runs.
|
|||||||
uninstall your WA plugins package, you will have to manually remove
|
uninstall your WA plugins package, you will have to manually remove
|
||||||
it from ``~/.workload_automation/packages`` otherwise WA will complain
|
it from ``~/.workload_automation/packages`` otherwise WA will complain
|
||||||
about a missing package next time you try to run it.
|
about a missing package next time you try to run it.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user