← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10410: Analytics, put back time logging

 

------------------------------------------------------------
revno: 10410
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-03-24 19:41:05 +0100
message:
  Analytics, put back time logging
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2013-03-22 13:56:53 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2013-03-24 18:41:05 +0000
@@ -105,6 +105,7 @@
 import org.hisp.dhis.system.util.ListUtils;
 import org.hisp.dhis.system.util.MathUtils;
 import org.hisp.dhis.system.util.SystemUtils;
+import org.hisp.dhis.system.util.Timer;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -377,8 +378,12 @@
     {
         int optimalQueries = MathUtils.getWithin( SystemUtils.getCpuCores(), 1, MAX_QUERIES );
         
+        Timer t = new Timer().start();
+        
         List<DataQueryParams> queries = queryPlanner.planQuery( params, optimalQueries, tableName );
         
+        t.getSplitTime( "Planned query" );
+        
         List<Future<Map<String, Double>>> futures = new ArrayList<Future<Map<String, Double>>>();
         
         Map<String, Double> map = new HashMap<String, Double>();
@@ -408,6 +413,8 @@
             }
         }
         
+        t.getTime( "Got aggregated value" );
+        
         return map;
     }