use of com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType in project midpoint by Evolveum.
the class StatisticsDtoModel method getStatisticsFromTaskType.
protected StatisticsDto getStatisticsFromTaskType(TaskType task) {
OperationStatsType operationStats = task.getOperationStats();
if (operationStats == null) {
LOGGER.warn("No operational information in task");
return null;
}
EnvironmentalPerformanceInformationType envInfo = operationStats.getEnvironmentalPerformanceInformation();
if (envInfo == null) {
LOGGER.warn("No environmental performance information in task");
return null;
}
StatisticsDto dto = new StatisticsDto(envInfo);
return dto;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType in project midpoint by Evolveum.
the class StatisticsDtoModel method getStatisticsFromTask.
protected StatisticsDto getStatisticsFromTask(Task task) {
OperationStatsType operationStats = task.getAggregatedLiveOperationStats();
if (operationStats == null) {
LOGGER.warn("No operational information in task");
return null;
}
EnvironmentalPerformanceInformationType envInfo = operationStats.getEnvironmentalPerformanceInformation();
if (envInfo == null) {
LOGGER.warn("No environmental performance information in task");
return null;
}
StatisticsDto dto = new StatisticsDto(envInfo);
return dto;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType in project midpoint by Evolveum.
the class MappingsLineDto method extractFromOperationalInformation.
public static List<MappingsLineDto> extractFromOperationalInformation(EnvironmentalPerformanceInformation environmentalPerformanceInformation) {
EnvironmentalPerformanceInformationType environmentalPerformanceInformationType = environmentalPerformanceInformation.getAggregatedValue();
MappingsStatisticsType mappingsStatisticsType = environmentalPerformanceInformationType.getMappingsStatistics();
return extractFromOperationalInformation(mappingsStatisticsType);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType in project midpoint by Evolveum.
the class NotificationsLineDto method extractFromOperationalInformation.
public static List<NotificationsLineDto> extractFromOperationalInformation(EnvironmentalPerformanceInformation environmentalPerformanceInformation) {
EnvironmentalPerformanceInformationType environmentalPerformanceInformationType = environmentalPerformanceInformation.getAggregatedValue();
NotificationsStatisticsType notificationsStatisticsType = environmentalPerformanceInformationType.getNotificationsStatistics();
return extractFromOperationalInformation(notificationsStatisticsType);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType in project midpoint by Evolveum.
the class EnvironmentalPerformanceInformation method addMappingsTo.
private static void addMappingsTo(EnvironmentalPerformanceInformationType rv, MappingsStatisticsType delta) {
if (delta == null) {
return;
}
if (rv.getMappingsStatistics() == null) {
rv.setMappingsStatistics(delta.clone());
return;
}
MappingsStatisticsType rvMST = rv.getMappingsStatistics();
for (MappingsStatisticsEntryType de : delta.getEntry()) {
String object = de.getObject();
MappingsStatisticsEntryType e = findMappingsEntryType(rvMST.getEntry(), object);
if (e == null) {
e = new MappingsStatisticsEntryType();
e.setObject(object);
rvMST.getEntry().add(e);
}
e.setCount(e.getCount() + de.getCount());
e.setMinTime(min(e.getMinTime(), de.getMinTime()));
e.setMaxTime(max(e.getMaxTime(), de.getMaxTime()));
e.setTotalTime(e.getTotalTime() + de.getTotalTime());
if (e.getCount() > 0) {
e.setAverageTime(e.getTotalTime() / e.getCount());
} else {
e.setAverageTime(null);
}
}
}
Aggregations