Performance improvements
 - Fast path of transactions updating a single key.
 - Bug fix in StoragePartitionClient where we were always creating a CachingMap

Change-Id: Ide117fba34fd12a9ff4aabd5fb7a21952bae672b
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultTransactionContext.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultTransactionContext.java
index be9ead4..cd61eb9 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultTransactionContext.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DefaultTransactionContext.java
@@ -76,7 +76,7 @@
     public CompletableFuture<CommitStatus> commit() {
         final MeteringAgent.Context timer = monitor.startTimer("commit");
         return transactionCoordinator.commit(transactionId, txParticipants)
-                .whenComplete((r, e) -> timer.stop(e));
+                                     .whenComplete((r, e) -> timer.stop(e));
     }
 
     @Override
@@ -89,7 +89,7 @@
             Serializer serializer) {
         // FIXME: Do not create duplicates.
         DefaultTransactionalMap<K, V> txMap = new DefaultTransactionalMap<K, V>(mapName,
-                creator.<K, V>newAsyncConsistentMap(mapName, serializer),
+                DistributedPrimitives.newMeteredMap(creator.<K, V>newAsyncConsistentMap(mapName, serializer)),
                 this,
                 serializer);
         txParticipants.add(txMap);