class documentation
class Statistics(object):
Statistics class. Handles all internal statistics.
| Method | configure |
Configure the statistics plugin. This is called when the configuration is loaded or reloaded. |
| Method | init |
Initialize the statistics plugin. |
| Method | purge |
Purge statistics data. |
| Method | restart |
Reset the statistics data. |
| Method | retrieve |
Retrieve statistics data. |
| Method | setup |
Setup the statistics dictionary. |
| Method | start |
Start the statistics plugin. This includes subscribing to events and starting the background worker for writing statistics to the database. |
| Method | statistics |
Background worker to write statistics to the database. |
| Method | stats |
Return the current statistics as a dictionary. |
| Method | stop |
Shutdown the statistics service. |
| Method | store |
Store statistics data. |
| Method | validate |
Validate the configuration for the statistics plugin. |
| Class Variable | __slots__ |
Slots of class attributes. |
| Class Variable | storage |
Injected Storage instance. |
| Instance Variable | stat |
Lock for statistic handling. |
| Instance Variable | stats |
Statistics records. |
| Method | _handle |
Generic handling of statist events. |
Configure the statistics plugin. This is called when the configuration is loaded or reloaded.
| Parameters | |
config:Configuration | The configuration object. |
Start the statistics plugin. This includes subscribing to events and starting the background worker for writing statistics to the database.
Background worker to write statistics to the database.
| Returns | |
bool | True if the statistics were written successfully, False otherwise. True continous the worker. |
Return the current statistics as a dictionary.
Returns: A dictionary containing the current statistics.
Validate the configuration for the statistics plugin.
| Parameters | |
config:Configuration | The configuration object. |