use of org.ovirt.engine.api.model.EntityProfileDetail in project ovirt-engine by oVirt.
the class V3EntityProfileDetailInAdapter method adapt.
@Override
public EntityProfileDetail adapt(V3EntityProfileDetail from) {
EntityProfileDetail to = new EntityProfileDetail();
if (from.isSetProfileDetail()) {
to.setProfileDetails(new ProfileDetails());
to.getProfileDetails().getProfileDetails().addAll(adaptIn(from.getProfileDetail()));
}
return to;
}
use of org.ovirt.engine.api.model.EntityProfileDetail in project ovirt-engine by oVirt.
the class GlusterVolumeProfileInfoMapper method mapProfileDetails.
private static void mapProfileDetails(List<StatsInfo> statsInfoList, EntityProfileDetail entityprofileDetail) {
for (StatsInfo statsInfo : statsInfoList) {
ProfileDetail profileDetail = new ProfileDetail();
profileDetail.setProfileType(statsInfo.getProfileStatsType().name());
profileDetail.setDuration(statsInfo.getDuration());
profileDetail.setStatistics(new Statistics());
profileDetail.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(TOTAL_READ), statsInfo.getTotalRead()));
profileDetail.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(TOTAL_WRITE), statsInfo.getTotalWrite()));
mapBlockStats(profileDetail, statsInfo);
mapFopStats(profileDetail, statsInfo);
entityprofileDetail.setProfileDetails(new ProfileDetails());
entityprofileDetail.getProfileDetails().getProfileDetails().add(profileDetail);
}
}
Aggregations