usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [11/50] [abbrv] incubator-usergrid git commit: Log total counts
Date Fri, 24 Jul 2015 15:21:39 GMT
Log total counts


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/75ad454c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/75ad454c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/75ad454c

Branch: refs/heads/USERGRID-869
Commit: 75ad454cf23bff8dd5ad8dc84563cc1a5520db7f
Parents: b9af09e
Author: Dave Johnson <snoopdave@apache.org>
Authored: Thu Jul 9 15:19:34 2015 -0400
Committer: Dave Johnson <snoopdave@apache.org>
Committed: Thu Jul 9 15:19:34 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/usergrid/tools/ImportAdmins.java   | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/75ad454c/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java b/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
index 4bcdc0b..0b69a98 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
@@ -625,13 +625,13 @@ public class ImportAdmins extends ToolBase {
                     long stopTime = System.currentTimeMillis();
                     long duration = stopTime - startTime;
                     durationSum += duration;
+                    metadataCount.getAndIncrement();
                     count++;
-
-                    //logger.debug( "Imported {}th metadata", count );
                     
                     if ( count % 30 == 0 ) {
-                        logger.info( "Imported {} metadata of total {}. Average metadata
Imported Rate: {}(ms)", 
-                           new Object[] { count, metadataCount.get(), durationSum / count
});
+                        logger.info( "Imported {} metadata of total {} expected. " +
+                                        "Average metadata Imported Rate: {}(ms)", 
+                           new Object[] { metadataCount.get(), userCount.get(), durationSum
/ count });
                     }
 
                 } catch (Exception e) {
@@ -694,7 +694,7 @@ public class ImportAdmins extends ToolBase {
                         logger.debug( "Imported admin user {} / {}",
                             new Object[] { uuid, entityProps.get( "username" ) } );
 
-                        userCount.addAndGet( 1 );
+                        userCount.getAndIncrement();
                         auditQueue.put(entityProps);
                         long stopTime = System.currentTimeMillis();
                         long duration = stopTime - startTime;
@@ -702,7 +702,8 @@ public class ImportAdmins extends ToolBase {
                         
                         count++;
                         if (count % 30 == 0) {
-                            logger.info( "Imported {} admin users of total {}. Average Creation
Rate: {}ms", 
+                            logger.info( "This worked has imported {} users of total {} imported
so far. " +
+                                            "Average Creation Rate: {}ms", 
                                 new Object[] { count, userCount.get(), durationSum / count
});
                         }
                         


Mime
View raw message