monitor

Monitor class to be subclassed for implementation of monitors.

Classes

Monitor([name])

Generic Monitor class that counts each time it polls.

Monitor

class module_testing.monitors.monitor.Monitor(name='Monitor')

Bases: object

Generic Monitor class that counts each time it polls.

Should be subclassed for new monitors, and __init__, run_one should be overridden with new functionality.

__init__(name='Monitor')
Parameters:

name – unique identifier to save results under if requested.

property header
Returns:

Monitor result header row (read-only).

property name
Returns:

Monitor name/identifier (read-only).

property result
Returns:

Monitor result (read-only).

run(context)

Run monitor.

Starts a loop of measurements and count current measurement number. Continues until context.stop is set.

Parameters:

context – Monitoring context manager this monitor is attached to.

Returns:

result once monitoring complete.

run_one(context, count)

Run a single cycle of the monitor.

Parameters:
  • context – Monitoring context manager this monitor is attached to.

  • count – Cycle number (counts sequentially).