Class TaskOperationStatsUtil
- java.lang.Object
-
- com.evolveum.midpoint.schema.util.task.TaskOperationStatsUtil
-
public class TaskOperationStatsUtil extends Object
Utility methods related to task operation statistics.
-
-
Constructor Summary
Constructors Constructor Description TaskOperationStatsUtil()
-
Method Summary
-
-
-
Method Detail
-
getItemsProcessedWithFailureFromTree
public static int getItemsProcessedWithFailureFromTree(TaskType task, PrismContext prismContext)
Returns the number of item processing failures from this task and its subtasks. Subtasks must be resolved into to full objects. TODO Avoid useless statistics aggregation (avoid "first aggregating, then selecting failures")
-
getItemsProcessedWithFailure
public static int getItemsProcessedWithFailure(TaskType task)
-
getItemsProcessedWithFailure
public static int getItemsProcessedWithFailure(OperationStatsType stats)
-
getItemsProcessedWithFailure
public static int getItemsProcessedWithFailure(IterativeTaskInformationType info)
-
getItemsProcessedWithSuccess
public static int getItemsProcessedWithSuccess(TaskType task)
-
getItemsProcessedWithSuccess
public static int getItemsProcessedWithSuccess(OperationStatsType stats)
-
getItemsProcessedWithSuccess
public static int getItemsProcessedWithSuccess(IterativeTaskInformationType info)
-
getItemsProcessedWithSkip
public static int getItemsProcessedWithSkip(IterativeTaskInformationType info)
-
getOperationStatsFromTree
public static OperationStatsType getOperationStatsFromTree(TaskType task, PrismContext prismContext)
Provides aggregated operation statistics from this task and all its subtasks. Works with stored operation stats, obviously. (We have no task instances here.) Assumes that the task has all subtasks filled-in. Currently does NOT support low-level performance statistics, namely: 1. repositoryPerformanceInformation, 2. cachesPerformanceInformation, 3. operationsPerformanceInformation, 4. workBucketManagementPerformanceInformation, 5. cachingConfiguration.
-
getItemsProcessed
public static Integer getItemsProcessed(TaskType task)
Returns the number of "iterations" i.e. how many times an item was processed by this task. It is useful e.g. to provide average values for performance indicators.
-
getItemsProcessed
public static Integer getItemsProcessed(OperationStatsType statistics)
Returns the number of "iterations" i.e. how many times an item was processed by this task. It is useful e.g. to provide average values for performance indicators.
-
getIterativeInfoForCurrentPart
public static IterativeTaskPartItemsProcessingInformationType getIterativeInfoForCurrentPart(OperationStatsType statistics, StructuredTaskProgressType structuredProgress)
-
getItemsProcessedForCurrentPart
public static int getItemsProcessedForCurrentPart(OperationStatsType statistics, StructuredTaskProgressType structuredTaskProgress)
-
getItemsProcessed
public static int getItemsProcessed(IterativeTaskPartItemsProcessingInformationType info)
-
getErrors
public static int getErrors(IterativeTaskPartItemsProcessingInformationType info)
-
getProcessingTime
public static double getProcessingTime(IterativeTaskPartItemsProcessingInformationType info)
-
getLastSuccessObjectName
public static String getLastSuccessObjectName(TaskType task)
Returns object that was last successfully processed by given task.
-
getLastProcessedObjectName
public static String getLastProcessedObjectName(IterativeTaskInformationType info, Predicate<ProcessedItemSetType> itemSetFilter)
Returns object that was last processed by given task in item set defined by the filter.
-
getDisplayName
public static <O extends ObjectType> String getDisplayName(PrismObject<O> object)
Returns display name for given object, e.g. fullName for a user, displayName for a role, and more detailed description for a shadow.
-
getObjectType
public static QName getObjectType(ObjectType object, PrismContext prismContext)
Returns the type name for an object. (This really belongs somewhere else, not here.)
-
isEmpty
public static boolean isEmpty(EnvironmentalPerformanceInformationType info)
-
isEmpty
public static boolean isEmpty(NotificationsStatisticsType notificationsStatistics)
-
isEmpty
public static boolean isEmpty(MappingsStatisticsType mappingsStatistics)
-
isEmpty
public static boolean isEmpty(ProvisioningStatisticsType provisioningStatistics)
-
sum
public static OperationStatsType sum(OperationStatsType a, OperationStatsType b)
Computes a sum of two operation statistics. Returns a modifiable object, independent from the source ones.
-
format
public static String format(OperationStatsType statistics)
-
getWallClockTime
public static long getWallClockTime(IterativeTaskPartItemsProcessingInformationType info)
-
-