Search in sources :

Example 6 with StatsInfo

use of org.ovirt.engine.core.common.businessentities.gluster.StatsInfo 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"));
}
Also used : StatsInfo(org.ovirt.engine.core.common.businessentities.gluster.StatsInfo) PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs) GlusterVolumeProfileStats(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileStats)

Example 7 with StatsInfo

use of org.ovirt.engine.core.common.businessentities.gluster.StatsInfo in project ovirt-engine by oVirt.

the class VolumeProfileStatisticsModel method onBrickSelectionChange.

private void onBrickSelectionChange(UIMessages messages) {
    if (getBricks().getSelectedItem() == null) {
        return;
    }
    int index = getProfileInfo().getBrickProfileDetails().indexOf(getBricks().getSelectedItem());
    if (index < 0) {
        return;
    }
    List<BrickProfileDetails> profileStats = getProfileInfo().getBrickProfileDetails();
    StatsInfo selectedBrickProfileCummulativeStats = profileStats.get(index).getProfileStats().get(0);
    StatsInfo selectedBrickProfileIntervalStats = profileStats.get(index).getProfileStats().get(1);
    populateCummulativeStatistics(selectedBrickProfileCummulativeStats.getFopStats(), getCumulativeStatistics());
    profileRunTime = formatRunTime(messages, selectedBrickProfileCummulativeStats.getDurationFormatted(), selectedBrickProfileIntervalStats.getDurationFormatted());
    // $NON-NLS-1$
    onPropertyChanged(new PropertyChangedEventArgs("brickProfileRunTimeChanged"));
    bytesRead = formatDataRead(messages, selectedBrickProfileCummulativeStats.getTotalRead(), selectedBrickProfileIntervalStats.getTotalRead());
    // $NON-NLS-1$
    onPropertyChanged(new PropertyChangedEventArgs("brickProfileDataRead"));
    bytesWritten = formatDataWritten(messages, selectedBrickProfileCummulativeStats.getTotalWrite(), selectedBrickProfileIntervalStats.getTotalWrite());
    // $NON-NLS-1$
    onPropertyChanged(new PropertyChangedEventArgs("brickProfileDataWritten"));
}
Also used : StatsInfo(org.ovirt.engine.core.common.businessentities.gluster.StatsInfo) PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs) BrickProfileDetails(org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails)

Aggregations

StatsInfo (org.ovirt.engine.core.common.businessentities.gluster.StatsInfo)7 ArrayList (java.util.ArrayList)2 Map (java.util.Map)2 BrickProfileDetails (org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails)2 GlusterVolumeProfileStats (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileStats)2 PropertyChangedEventArgs (org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs)2 TimeUnit (java.util.concurrent.TimeUnit)1 BlockStatistics (org.ovirt.engine.api.model.BlockStatistics)1 BrickProfileDetail (org.ovirt.engine.api.model.BrickProfileDetail)1 BrickProfileDetails (org.ovirt.engine.api.model.BrickProfileDetails)1 EntityProfileDetail (org.ovirt.engine.api.model.EntityProfileDetail)1 FopStatistics (org.ovirt.engine.api.model.FopStatistics)1 GlusterVolumeProfileDetails (org.ovirt.engine.api.model.GlusterVolumeProfileDetails)1 NfsProfileDetail (org.ovirt.engine.api.model.NfsProfileDetail)1 NfsProfileDetails (org.ovirt.engine.api.model.NfsProfileDetails)1 ProfileDetail (org.ovirt.engine.api.model.ProfileDetail)1 ProfileDetails (org.ovirt.engine.api.model.ProfileDetails)1 Statistics (org.ovirt.engine.api.model.Statistics)1 GlusterBrickEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity)1