datalogd.plugins.sinktimer_datafilter module

class datalogd.plugins.sinktimer_datafilter.SinkTimerDataFilter(sinks=[], info=0.1, warning=0.5)[source]

Bases: DataFilter

Time how long each sink takes to receive data and warn if any exceed a given threshold.

This filter may be used for testing and debugging. If a sink takes longer than a given time to process data, report the event using the python logging system. Two levels of reporting are enabled, controlled by the info and warning parameters. These parameters are the threshold times, in seconds.

Parameters:
  • info – Threshold time to log at the “info” level.

  • warning – Threshold time to log at the “warning” level.

receive(data)[source]

Accept data and pass on to connected sinks.

Parameters:

data – Data to process.

send(data)[source]

Send data to each connected sink, alerting if their processing time exceeds given values.