use of org.ovirt.engine.api.model.FopStatistics in project ovirt-engine by oVirt.
the class V3ProfileDetailInAdapter method adapt.
@Override
public ProfileDetail adapt(V3ProfileDetail from) {
ProfileDetail to = new ProfileDetail();
if (from.isSetBlockStatistic()) {
to.setBlockStatistics(new BlockStatistics());
to.getBlockStatistics().getBlockStatistics().addAll(adaptIn(from.getBlockStatistic()));
}
if (from.isSetDuration()) {
to.setDuration(from.getDuration());
}
if (from.isSetFopStatistic()) {
to.setFopStatistics(new FopStatistics());
to.getFopStatistics().getFopStatistics().addAll(adaptIn(from.getFopStatistic()));
}
if (from.isSetProfileType()) {
to.setProfileType(from.getProfileType());
}
if (from.isSetStatistic()) {
to.setStatistics(new Statistics());
to.getStatistics().getStatistics().addAll(adaptIn(from.getStatistic()));
}
return to;
}
use of org.ovirt.engine.api.model.FopStatistics in project ovirt-engine by oVirt.
the class GlusterVolumeProfileInfoMapper method mapFopStats.
private static void mapFopStats(ProfileDetail profileDetail, StatsInfo statsInfo) {
for (FopStats fopStat : statsInfo.getFopStats()) {
FopStatistic fStat = new FopStatistic();
fStat.setName(fopStat.getName());
fStat.setStatistics(new Statistics());
fStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(MIN_LATENCY), fopStat.getMinLatency()));
fStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(MAX_LATENCY), fopStat.getMaxLatency()));
fStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(AVG_LATENCY), fopStat.getAvgLatency()));
fStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(HITS), fopStat.getHits()));
profileDetail.setFopStatistics(new FopStatistics());
profileDetail.getFopStatistics().getFopStatistics().add(fStat);
}
}
Aggregations