* Use the new class EventMetric to cleanup and simplify the implementation
* Replaced the single metric for Topology Events with four metrics
(last event timestamp and event rate):
- Device Event metrics
- Host Event metrics
- Link Event metrics
- Topology Graph metrics
Change-Id: I2acc06ab84ef3ca06d0d383983dfcff9774ff341
Devices, Hosts, Links, TopologyEvent
Now the semantics for updating the metrics are:
* Any topology-related event (DeviceEvent, HostEvent, LinkEvent,
TopologyEvent) will update the Lost Topology Event Timestamp
* Only the DeviceEvent, HostEvent and LinkEvent will be counted in
measuring the event rate; TopologyEvent is excluded, because it
is generated as a result of some of those events
Also, increased the number of saved events from 10 to 100.
Change-Id: Ie759ee69869cddc617d7ad5b8b75a622e2571620
event metrics collector. It can be loaded by one of the following two (new)
features: onos-app-metrics, onos-app-metrics-topology
After loading the module, it subscribes for topology-related events
and keeps the following state:
(a) The last 10 events
(b) The timestamp of the last event (ms after epoch) as observed by this
module
(c) The rate of the topology events: count, median rate, average rate
over the last 1, 5 or 15 minutes
The following CLI commands are added:
* onos:topology-events
Shows the last 10 topology events
* onos:topology-events-metrics
Shows the timestamp of the last event, and the rate of the topology
events: see (b) and (c) above