Search in sources :

Example 1 with MemoryUtilizationModel

use of com.cisco.trex.stl.gui.models.MemoryUtilizationModel in project trex-stateless-gui by cisco-system-traffic-generator.

the class UtilizationController method renderMbuf.

private void renderMbuf() {
    UtilizationStorage utilizationStorage = statsStorage.getUtilizationStorage();
    synchronized (utilizationStorage.getDataLock()) {
        List<MemoryUtilizationModel> memUtilsModels = utilizationStorage.getMemUtilsModels();
        memoryUtilTable.getItems().clear();
        memoryUtilTable.getItems().addAll(memUtilsModels);
    }
}
Also used : MemoryUtilizationModel(com.cisco.trex.stl.gui.models.MemoryUtilizationModel) UtilizationStorage(com.cisco.trex.stl.gui.storages.UtilizationStorage)

Example 2 with MemoryUtilizationModel

use of com.cisco.trex.stl.gui.models.MemoryUtilizationModel in project trex-stateless-gui by cisco-system-traffic-generator.

the class UtilizationStorage method totalMemUtilization.

private MemoryUtilizationModel totalMemUtilization(Map<String, Map<String, List<Integer>>> mbufStats) {
    Iterator<Map.Entry<String, Map<String, List<Integer>>>> iterator = mbufStats.entrySet().iterator();
    Map.Entry<String, Map<String, List<Integer>>> firstSocket = iterator.next();
    Map<String, List<Integer>> memoryStats = firstSocket.getValue();
    int usedTotalMemoryBytes = memoryStats.entrySet().stream().map(this::computeTotalUsedMemoryPerBank).mapToInt(Integer::new).sum();
    return new MemoryUtilizationModel("Total", memoryStats.get("64b").get(1), memoryStats.get("128b").get(1), memoryStats.get("256b").get(1), memoryStats.get("512b").get(1), memoryStats.get("1024b").get(1), memoryStats.get("2048b").get(1), memoryStats.get("4096b").get(1), memoryStats.get("9kb").get(1), String.valueOf(usedTotalMemoryBytes / 1000000));
}
Also used : MemoryUtilizationModel(com.cisco.trex.stl.gui.models.MemoryUtilizationModel) CpuUtilStatPoint(com.cisco.trex.stl.gui.models.CpuUtilStatPoint)

Aggregations

MemoryUtilizationModel (com.cisco.trex.stl.gui.models.MemoryUtilizationModel)2 CpuUtilStatPoint (com.cisco.trex.stl.gui.models.CpuUtilStatPoint)1 UtilizationStorage (com.cisco.trex.stl.gui.storages.UtilizationStorage)1