3 À<×ej ã@s,ddlZejjƒZdgZGdd„deƒZdS)éNÚMonitorc@sÐeZdZdZedd„ƒZedd„ƒZedd„ƒZedd „ƒZed d „ƒZ ed d „ƒZ edd„ƒZ edd„ƒZ edd„ƒZ d&dd„Zdd„Zdd„Zedd„ƒZejdd„ƒZdd„Zd d!„Zd"d#„Zd$d%„ZdS)'rzô Base class for all monitors. Monitors provide data about the running system to Plugin objects, which use the data to tune system parameters. Following methods require reimplementation: - _init_available_devices(cls) - update(cls) cCs\d|_tƒ|_tƒ|_tƒ|_i|_|jƒt|jtƒst|tƒst|tƒst‚||jkr:|jj|ƒ|jj|ƒdS)N)r r'r(r r%rr)r!r)rrrÚ remove_devicers  zMonitor.remove_devicecs t‡fdd„tˆjjƒƒDƒƒS)Ncsg|]}|dˆjkr|‘qS)r)r%)Ú.0Zdev_load)r!rrú ysz$Monitor.get_load..)ÚdictÚlistrÚitems)r!r)r!rÚget_loadxszMonitor.get_loadcCs|jj|dƒS)N)rÚget)r!r)rrrÚget_device_load{szMonitor.get_device_load)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú classmethodrr rrrrrrrr"r$r#ÚpropertyrÚsetterr*r+r1r3rrrrrs&           )Z tuned.logsZtunedZlogsr2r Ú__all__ÚobjectrrrrrÚs