Repository: cloudstack
Updated Branches:
  refs/heads/master af902fd9d -> e4f7fb74e

Using Profiler class, from the utils package, instead of 
System.currentTimeMillis()

Signed-off-by: wilderrodrigues <wrodrig...@schubergphilis.com>

This closes #524


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e4f7fb74
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e4f7fb74
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e4f7fb74

Branch: refs/heads/master
Commit: e4f7fb74efe56cafb67642eebef745c671a6454c
Parents: ea1f2eb
Author: wilderrodrigues <wrodrig...@schubergphilis.com>
Authored: Thu Jun 25 08:01:51 2015 +0200
Committer: wilderrodrigues <wrodrig...@schubergphilis.com>
Committed: Thu Jun 25 09:13:46 2015 +0200

----------------------------------------------------------------------
 .../cluster/src/com/cloud/cluster/ClusterManagerImpl.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e4f7fb74/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
----------------------------------------------------------------------
diff --git a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java 
b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
index 02597c3..a9b01d4 100644
--- a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
+++ b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java
@@ -261,11 +261,15 @@ public class ClusterManagerImpl extends ManagerBase 
implements ClusterManager, C
                                         pdu.getSequenceId() + ", pdu ack seq: 
" + pdu.getAckSequenceId() + ", json: " + pdu.getJsonPackage());
                             }
 
-                            final long startTick = System.currentTimeMillis();
+                            final Profiler profiler = new Profiler();
+                            profiler.start();
+
                             final String strResult = peerService.execute(pdu);
+                            profiler.stop();
+
                             if (s_logger.isDebugEnabled()) {
                                 s_logger.debug("Cluster PDU " + 
getSelfPeerName() + " -> " + pdu.getDestPeer() + " completed. time: " +
-                                        (System.currentTimeMillis() - 
startTick) + "ms. agent: " + pdu.getAgentId() + ", pdu seq: " + 
pdu.getSequenceId() +
+                                        profiler.getDurationInMillis() + "ms. 
agent: " + pdu.getAgentId() + ", pdu seq: " + pdu.getSequenceId() +
                                         ", pdu ack seq: " + 
pdu.getAckSequenceId() + ", json: " + pdu.getJsonPackage());
                             }
 

Reply via email to