Search in sources :

Example 6 with MeterStatsAndDescriptor

use of org.openkilda.wfm.topology.stats.model.MeterStatsAndDescriptor in project open-kilda by telstra.

the class MeterStatsMetricGenBolt method handleInput.

@Override
protected void handleInput(Tuple input) throws Exception {
    SwitchMeterStats stats = pullValue(input, STATS_FIELD, SwitchMeterStats.class);
    log.debug("Received meter statistics: {}.", stats);
    long timestamp = getCommandContext().getCreateTime();
    SwitchId switchId = stats.getSwitchId();
    for (MeterStatsAndDescriptor entry : stats.getStatsEntries()) {
        handleStatsData(entry.getData(), timestamp, switchId, entry.getDescriptor());
    }
}
Also used : MeterStatsAndDescriptor(org.openkilda.wfm.topology.stats.model.MeterStatsAndDescriptor) SwitchMeterStats(org.openkilda.wfm.topology.stats.model.SwitchMeterStats) SwitchId(org.openkilda.model.SwitchId)

Aggregations

MeterStatsAndDescriptor (org.openkilda.wfm.topology.stats.model.MeterStatsAndDescriptor)6 Test (org.junit.Test)4 MeterStatsData (org.openkilda.messaging.info.stats.MeterStatsData)4 Flow (org.openkilda.model.Flow)4 YFlow (org.openkilda.model.YFlow)4 CommonFlowDescriptor (org.openkilda.wfm.topology.stats.model.CommonFlowDescriptor)3 UpdateFlowPathInfo (org.openkilda.messaging.info.stats.UpdateFlowPathInfo)2 FlowPath (org.openkilda.model.FlowPath)2 MeterId (org.openkilda.model.MeterId)2 MeterStatsEntry (org.openkilda.messaging.info.stats.MeterStatsEntry)1 RemoveFlowPathInfo (org.openkilda.messaging.info.stats.RemoveFlowPathInfo)1 FlowEndpoint (org.openkilda.model.FlowEndpoint)1 Switch (org.openkilda.model.Switch)1 SwitchId (org.openkilda.model.SwitchId)1 TestFlowBuilder (org.openkilda.wfm.share.flow.TestFlowBuilder)1 TestYFlowBuilder (org.openkilda.wfm.share.yflow.TestYFlowBuilder)1 TestYSubFlowBuilder (org.openkilda.wfm.share.yflow.TestYSubFlowBuilder)1 KildaEntryDescriptor (org.openkilda.wfm.topology.stats.model.KildaEntryDescriptor)1 SwitchMeterStats (org.openkilda.wfm.topology.stats.model.SwitchMeterStats)1 YFlowDescriptor (org.openkilda.wfm.topology.stats.model.YFlowDescriptor)1