Search in sources :

Example 6 with SystemTimer

use of org.hisp.dhis.commons.timer.SystemTimer in project dhis2-core by dhis2.

the class DataIntegrityTask method run.

// -------------------------------------------------------------------------
// Runnable implementation
// -------------------------------------------------------------------------
@Override
public void run() {
    Timer timer = new SystemTimer().start();
    FlattenedDataIntegrityReport report = dataIntegrityService.getFlattenedDataIntegrityReport();
    timer.stop();
    if (taskId != null) {
        notifier.notify(taskId, NotificationLevel.INFO, "Data integrity checks completed in " + timer.toString() + ".", true).addTaskSummary(taskId, report);
    }
}
Also used : SystemTimer(org.hisp.dhis.commons.timer.SystemTimer) Timer(org.hisp.dhis.commons.timer.Timer) FlattenedDataIntegrityReport(org.hisp.dhis.dataintegrity.FlattenedDataIntegrityReport) SystemTimer(org.hisp.dhis.commons.timer.SystemTimer)

Aggregations

SystemTimer (org.hisp.dhis.commons.timer.SystemTimer)6 Timer (org.hisp.dhis.commons.timer.Timer)6 IdentifiableObject (org.hisp.dhis.common.IdentifiableObject)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 List (java.util.List)2 ObjectBundleValidationReport (org.hisp.dhis.dxf2.metadata.objectbundle.feedback.ObjectBundleValidationReport)2 TypeReport (org.hisp.dhis.feedback.TypeReport)2 Query (org.hisp.dhis.query.Query)2 Lists (com.google.common.collect.Lists)1 Collection (java.util.Collection)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Set (java.util.Set)1 Collectors (java.util.stream.Collectors)1 StringUtils (org.apache.commons.lang3.StringUtils)1 Log (org.apache.commons.logging.Log)1 LogFactory (org.apache.commons.logging.LogFactory)1 Attribute (org.hisp.dhis.attribute.Attribute)1 AttributeService (org.hisp.dhis.attribute.AttributeService)1