=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java 2015-07-08 09:56:56 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DefaultDataValueSetService.java 2015-07-14 13:10:08 +0000 @@ -94,6 +94,7 @@ import org.hisp.dhis.system.util.ValidationUtils; import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.commons.collection.CachingMap; +import org.hisp.dhis.commons.util.Clock; import org.hisp.dhis.commons.util.DebugUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -536,9 +537,9 @@ */ private ImportSummary saveDataValueSet( ImportOptions importOptions, TaskId id, DataValueSet dataValueSet ) { - log.debug( "Import options: " + importOptions ); - notifier.clear( id ).notify( id, "Process started" ); - + Clock clock = new Clock( log ).startClock().logTime( "Starting data value import, options: " + importOptions ); + notifier.clear( id ).notify( id, "Process started" ); + ImportSummary summary = new ImportSummary(); I18n i18n = i18nManager.getI18n(); @@ -588,7 +589,8 @@ { notifier.notify( id, "Loading data elements and organisation units" ); dataElementMap.putAll( identifiableObjectManager.getIdMap( DataElement.class, dataElementIdScheme ) ); - orgUnitMap.putAll( getOrgUnitMap( orgUnitIdScheme ) ); + orgUnitMap.putAll( getOrgUnitMap( orgUnitIdScheme ) ); + clock.logTime( "Preheated data element and organisation unit caches" ); } IdentifiableObjectCallable dataElementCallable = new IdentifiableObjectCallable<>( @@ -672,8 +674,8 @@ Date now = new Date(); + clock.logTime( "Validated outer meta-data" ); notifier.notify( id, "Importing data values" ); - log.info( "Importing data values" ); while ( dataValueSet.hasNextDataValue() ) { @@ -855,7 +857,7 @@ summary.setDescription( "Import process completed successfully" ); notifier.notify( id, INFO, "Import done", true ).addTaskSummary( id, summary ); - log.info( "Data value import done, total: " + totalCount + ", import: " + importCount + ", update: " + updateCount ); + clock.logTime( "Data value import done, total: " + totalCount + ", import: " + importCount + ", update: " + updateCount ); dataValueSet.close();