use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileStats in project ovirt-engine by oVirt.
the class GlusterVolumeProfileInfoReturn method prepareNfsProfileDetails.
private List<GlusterVolumeProfileStats> prepareNfsProfileDetails(Object[] nfsServerProfileDetails) {
List<GlusterVolumeProfileStats> nfsProfileDetails = new ArrayList<>();
for (Object nfsObject : nfsServerProfileDetails) {
GlusterVolumeProfileStats nfsDetails = new GlusterVolumeProfileStats();
Map<String, Object> nfsProfile = (Map<String, Object>) nfsObject;
nfsDetails.setIdentity((String) nfsProfile.get(NFS));
List<StatsInfo> statsInfo = new ArrayList<>();
statsInfo.add(getStatInfo((Map<String, Object>) nfsProfile.get(CUMULATIVE_STATS), CUMULATIVE_STATS));
statsInfo.add(getStatInfo((Map<String, Object>) nfsProfile.get(INTERVAL_STATS), INTERVAL_STATS));
nfsDetails.setProfileStats(statsInfo);
nfsProfileDetails.add(nfsDetails);
}
return nfsProfileDetails;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileStats in project ovirt-engine by oVirt.
the class VolumeProfileStatisticsModel method onNfsServerSelectionChange.
private void onNfsServerSelectionChange(UIMessages messages) {
if (getNfsServers().getSelectedItem() == null) {
return;
}
int index = getProfileInfo().getNfsProfileDetails().indexOf(getNfsServers().getSelectedItem());
if (index < 0) {
return;
}
List<GlusterVolumeProfileStats> nfsProfileStats = getProfileInfo().getNfsProfileDetails();
StatsInfo selectedNfsServerCummulativeProfile = nfsProfileStats.get(index).getProfileStats().get(0);
StatsInfo selectedNfsServerIntervalProfile = nfsProfileStats.get(index).getProfileStats().get(1);
populateCummulativeStatistics(selectedNfsServerCummulativeProfile.getFopStats(), getNfsServerProfileStats());
nfsProfileRunTime = formatRunTime(messages, selectedNfsServerCummulativeProfile.getDurationFormatted(), selectedNfsServerIntervalProfile.getDurationFormatted());
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("nfsProfileRunTimeChanged"));
nfsBytesRead = formatDataRead(messages, selectedNfsServerCummulativeProfile.getTotalRead(), selectedNfsServerIntervalProfile.getTotalRead());
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("nfsProfileDataRead"));
nfsBytesWritten = formatDataWritten(messages, selectedNfsServerCummulativeProfile.getTotalWrite(), selectedNfsServerIntervalProfile.getTotalWrite());
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("nfsProfileDataWritten"));
}
Aggregations