2018-04-27 10:57:49 +01:00
|
|
|
.. _instruments_method_map:
|
|
|
|
|
|
|
|
Instrumentation Signal-Method Mapping
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2018-06-05 10:53:40 +01:00
|
|
|
Instrument methods get automatically hooked up to signals based on their names.
|
|
|
|
Mostly, the method name corresponds to the name of the signal, however there are
|
|
|
|
a few convenience aliases defined (listed first) to make easier to relate
|
2018-06-05 16:16:59 +01:00
|
|
|
instrumentation code to the workload execution model. For an overview on when
|
2018-06-21 14:56:09 +01:00
|
|
|
these signals are dispatched during execution please see the
|
|
|
|
:ref:`Developer Reference <signal_dispatch>`.
|
2018-04-27 10:57:49 +01:00
|
|
|
|
|
|
|
$signal_names
|
|
|
|
|
2018-06-05 10:53:40 +01:00
|
|
|
The methods above may be decorated with on the listed decorators to set the
|
2020-06-30 11:14:10 +01:00
|
|
|
priority (a value in the ``wa.framework.signal.CallbackPriority`` enum) of the
|
|
|
|
Instrument method relative to other callbacks registered for the signal (within
|
|
|
|
the same priority level, callbacks are invoked in the order they were
|
|
|
|
registered). The table below shows the mapping of the decorator to the
|
|
|
|
corresponding priority name and level:
|
2018-04-27 10:57:49 +01:00
|
|
|
|
|
|
|
$priority_prefixes
|
2018-06-12 11:06:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
Unresponsive Targets
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
If a target is believed to be unresponsive, instrument callbacks will be
|
|
|
|
disabled to prevent a cascade of errors and potential corruptions of state, as
|
|
|
|
it is generally assumed that instrument callbacks will want to do something with
|
|
|
|
the target.
|
|
|
|
|
|
|
|
If your callback only does something with the host, and does not require an
|
|
|
|
active target connection, you can decorate it with ``@hostside`` decorator to
|
|
|
|
ensure it gets invoked even if the target becomes unresponsive.
|