Search in sources :

Example 1 with PGIDStatsService

use of com.exalttech.trex.ui.views.services.PGIDStatsService in project trex-stateless-gui by cisco-system-traffic-generator.

the class PGIDStatsStorage method handlePGIDStatsReceived.

private void handlePGIDStatsReceived(final WorkerStateEvent event) {
    final PGIDStatsService service = (PGIDStatsService) event.getSource();
    final PGIdStatsRPCResult receivedPGIDStats = service.getValue();
    final double time = System.currentTimeMillis() / 1000.0;
    final Map<String, FlowStat> flowStatMap = receivedPGIDStats.getFlowStats();
    if (flowStatMap != null) {
        processFlowStats(receivedPGIDStats.getFlowStats(), time);
    }
    final Map<String, LatencyStat> latencyStatMap = receivedPGIDStats.getLatency();
    if (latencyStatMap != null) {
        processLatencyStats(receivedPGIDStats.getLatency(), time);
    }
    handleStatsChanged();
}
Also used : PGIdStatsRPCResult(com.cisco.trex.stateless.model.stats.PGIdStatsRPCResult) FlowStat(com.cisco.trex.stateless.model.stats.FlowStat) PGIDStatsService(com.exalttech.trex.ui.views.services.PGIDStatsService) LatencyStat(com.cisco.trex.stateless.model.stats.LatencyStat)

Aggregations

FlowStat (com.cisco.trex.stateless.model.stats.FlowStat)1 LatencyStat (com.cisco.trex.stateless.model.stats.LatencyStat)1 PGIdStatsRPCResult (com.cisco.trex.stateless.model.stats.PGIdStatsRPCResult)1 PGIDStatsService (com.exalttech.trex.ui.views.services.PGIDStatsService)1