Search in sources :

Example 1 with FlowStats

use of com.exalttech.trex.remote.models.profiles.FlowStats in project trex-stateless-gui by cisco-system-traffic-generator.

the class MainViewController method loadStreamTable.

/**
 * View YAML file stream table data
 *
 * @param fileName
 */
private void loadStreamTable(String fileName) {
    if (loadProfile(fileName)) {
        allStreamWithLatency = false;
        boolean flowStatsEnabled = false;
        boolean latencyEnabled = false;
        if (loadedProfiles.length > 0) {
            allStreamWithLatency = true;
            for (Profile profile : loadedProfiles) {
                FlowStats flowStats = profile.getStream().getFlowStats();
                allStreamWithLatency = allStreamWithLatency && flowStats.isLatencyEnabled();
                flowStatsEnabled = flowStatsEnabled || flowStats.getEnabled();
                latencyEnabled = latencyEnabled || flowStats.isLatencyEnabled();
            }
        }
        runningConfiguration.flowStatsEnabledProperty().set(flowStatsEnabled);
        runningConfiguration.latencyEnabledProperty().set(latencyEnabled);
        multiplierView.setDisable(allStreamWithLatency);
        notificationPanelHolder.setVisible(allStreamWithLatency);
    }
}
Also used : FlowStats(com.exalttech.trex.remote.models.profiles.FlowStats) Profile(com.exalttech.trex.remote.models.profiles.Profile) AssignedProfile(com.exalttech.trex.ui.views.models.AssignedProfile)

Aggregations

FlowStats (com.exalttech.trex.remote.models.profiles.FlowStats)1 Profile (com.exalttech.trex.remote.models.profiles.Profile)1 AssignedProfile (com.exalttech.trex.ui.views.models.AssignedProfile)1