Search in sources :

Example 6 with EnvironmentalPerformanceInformationType

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;
}
Also used : EnvironmentalPerformanceInformationType(com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType) OperationStatsType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType)

Example 7 with EnvironmentalPerformanceInformationType

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;
}
Also used : EnvironmentalPerformanceInformationType(com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType) OperationStatsType(com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType)

Example 8 with EnvironmentalPerformanceInformationType

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);
}
Also used : MappingsStatisticsType(com.evolveum.midpoint.xml.ns._public.common.common_3.MappingsStatisticsType) EnvironmentalPerformanceInformationType(com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType)

Example 9 with EnvironmentalPerformanceInformationType

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);
}
Also used : NotificationsStatisticsType(com.evolveum.midpoint.xml.ns._public.common.common_3.NotificationsStatisticsType) EnvironmentalPerformanceInformationType(com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType)

Example 10 with EnvironmentalPerformanceInformationType

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);
        }
    }
}
Also used : MappingsStatisticsType(com.evolveum.midpoint.xml.ns._public.common.common_3.MappingsStatisticsType) MappingsStatisticsEntryType(com.evolveum.midpoint.xml.ns._public.common.common_3.MappingsStatisticsEntryType)

Aggregations

EnvironmentalPerformanceInformationType (com.evolveum.midpoint.xml.ns._public.common.common_3.EnvironmentalPerformanceInformationType)8 MappingsStatisticsType (com.evolveum.midpoint.xml.ns._public.common.common_3.MappingsStatisticsType)2 NotificationsStatisticsType (com.evolveum.midpoint.xml.ns._public.common.common_3.NotificationsStatisticsType)2 OperationStatsType (com.evolveum.midpoint.xml.ns._public.common.common_3.OperationStatsType)2 ProvisioningStatisticsType (com.evolveum.midpoint.xml.ns._public.common.common_3.ProvisioningStatisticsType)2 MappingsStatisticsEntryType (com.evolveum.midpoint.xml.ns._public.common.common_3.MappingsStatisticsEntryType)1 NotificationsStatisticsEntryType (com.evolveum.midpoint.xml.ns._public.common.common_3.NotificationsStatisticsEntryType)1 ProvisioningStatisticsEntryType (com.evolveum.midpoint.xml.ns._public.common.common_3.ProvisioningStatisticsEntryType)1 QName (javax.xml.namespace.QName)1