usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [25/50] incubator-usergrid git commit: more meters
Date Mon, 16 Mar 2015 23:37:53 GMT
more meters


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

Branch: refs/heads/two-dot-o
Commit: 615e3fc9073530dcfef5774d53b744fe242ba5ea
Parents: 8fa5c9f
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Wed Mar 11 15:23:16 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Wed Mar 11 15:23:16 2015 -0600

----------------------------------------------------------------------
 .../impl/EntityCollectionManagerImpl.java       | 39 ++++++++++++++++++--
 .../graph/impl/GraphManagerImpl.java            |  2 +-
 2 files changed, 37 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/615e3fc9/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
index 391e9a5..50b581a 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
@@ -124,6 +124,10 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager
{
     private final Timer updateTimer;
     private final Timer loadTimer;
     private final Timer getLatestTimer;
+    private final Meter deleteMeter;
+    private final Meter getLatestMeter;
+    private final Meter loadMeter;
+    private final Meter updateMeter;
 
 
     @Inject
@@ -176,9 +180,13 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager
{
         this.writeTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class,"write.timer");
         this.writeMeter = metricsFactory.getMeter(EntityCollectionManagerImpl.class, "write.meter");
         this.deleteTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class, "delete.timer");
-        this.updateTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class,"update.timer");
+        this.deleteMeter= metricsFactory.getMeter(EntityCollectionManagerImpl.class, "delete.meter");
+        this.updateTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class, "update.timer");
+        this.updateMeter = metricsFactory.getMeter(EntityCollectionManagerImpl.class, "update.meter");
         this.loadTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class,"load.timer");
+        this.loadMeter = metricsFactory.getMeter(EntityCollectionManagerImpl.class, "load.meter");
         this.getLatestTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class,"latest.timer");
+        this.getLatestMeter = metricsFactory.getMeter(EntityCollectionManagerImpl.class,
"latest.meter");
     }
 
 
@@ -250,12 +258,19 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager
{
                          return entity.getId();
                      }
                  }
-            ) .doOnCompleted(new Action0() {
+            )
+            .doOnNext(new Action1<Id>() {
+                @Override
+                public void call(Id id) {
+                    deleteMeter.mark();
+                }
+            })
+            .doOnCompleted(new Action0() {
                 @Override
                 public void call() {
                     timer.stop();
                 }
-            });;
+            });
 
         return o;
     }
@@ -281,6 +296,12 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager
{
                 return Observable.from(entity.getEntity().get());
             }
         })
+            .doOnNext(new Action1<Entity>() {
+                @Override
+                public void call(Entity entity) {
+                    loadMeter.mark();
+                }
+            })
             .doOnCompleted(new Action0() {
                 @Override
                 public void call() {
@@ -316,6 +337,12 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager
{
                 }
             }
         } )
+            .doOnNext(new Action1<EntitySet>() {
+                @Override
+                public void call(EntitySet entitySet) {
+                    loadMeter.mark();
+                }
+            })
             .doOnCompleted(new Action0() {
                 @Override
                 public void call() {
@@ -382,6 +409,12 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager
{
 
             }
         }).doOnError(rollback)
+            .doOnNext(new Action1<Entity>() {
+                @Override
+                public void call(Entity entity) {
+                    updateMeter.mark();
+                }
+            })
             .doOnCompleted(new Action0() {
                 @Override
                 public void call() {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/615e3fc9/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
index 53e116d..f19d613 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
@@ -166,7 +166,7 @@ public class GraphManagerImpl implements GraphManager {
         this.loadEdgesToTargetByTypeTimer = metricsFactory.getTimer(GraphManagerImpl.class,
"load.to.type.timer");
 
         this.getEdgeTypesFromSourceTimer = metricsFactory.getTimer(GraphManagerImpl.class,"get.edge.from.timer");
-        this.getEdgeTypesFromSourceMeter = metricsFactory.getMeter(GraphManagerImpl.class,
"write.edge.meter");
+        this.getEdgeTypesFromSourceMeter = metricsFactory.getMeter(GraphManagerImpl.class,
"get.edge.from.meter");
 
         this.getIdTypesFromSourceTimer = metricsFactory.getTimer(GraphManagerImpl.class,"get.idtype.from.timer");
         this.getIdTypesFromSourceMeter = metricsFactory.getMeter(GraphManagerImpl.class,
"get.idtype.from.meter");


Mime
View raw message