device: add statistics interface

System Internals / NetworkManager - Alfonso Sanchez-Beato [canonical.com] - 17 August 2016 08:50 UTC

Add statistics interface to all device instances. When active, the properties of this interface are refreshed whenever there is network activity for the device.

Activation is performed by changing RefreshRateMs property. If set to zero, the interface is deactivated. If set to other value, the rest of the interface properties are refreshed whenever the related network metric changes, being RefreshRateMs the minimum time between property changes, in milliseconds.

24b193a device: add statistics interface
introspection/Makefile.am | 6 +-
introspection/nm-device-statistics.xml | 37 ++++++++++
libnm-core/nm-dbus-interface.h | 1 +
src/Makefile.am | 2 +
src/devices/nm-device-private.h | 3 +
src/devices/nm-device-statistics.c | 99 +++++++++++++++++++++++++++
src/devices/nm-device-statistics.h | 31 +++++++++
src/devices/nm-device.c | 117 ++++++++++++++++++++++++++++++++
src/devices/nm-device.h | 4 ++
9 files changed, 299 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share