use of org.ovirt.engine.api.model.BlockStatistic in project ovirt-engine by oVirt.
the class GlusterVolumeProfileInfoMapper method mapBlockStats.
private static void mapBlockStats(ProfileDetail profileDetail, StatsInfo statsInfo) {
for (BlockStats blockStat : statsInfo.getBlockStats()) {
BlockStatistic bStat = new BlockStatistic();
bStat.setStatistics(new Statistics());
bStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(BLOCK_SIZE), blockStat.getSize()));
bStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(BYTES_BLOCK_READ), blockStat.getBlockRead()));
bStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(BYTES_BLOCK_WRITE), blockStat.getBlockWrite()));
profileDetail.setBlockStatistics(new BlockStatistics());
profileDetail.getBlockStatistics().getBlockStatistics().add(bStat);
}
}
use of org.ovirt.engine.api.model.BlockStatistic in project ovirt-engine by oVirt.
the class V3BlockStatisticInAdapter method adapt.
public BlockStatistic adapt(V3BlockStatistic from) {
BlockStatistic to = new BlockStatistic();
if (from.isSetStatistic()) {
to.setStatistics(new Statistics());
to.getStatistics().getStatistics().addAll(adaptIn(from.getStatistic()));
}
return to;
}
Aggregations