cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [1/2] git commit: updated refs/heads/master to e4f7fb7
Date Thu, 25 Jun 2015 07:14:00 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master af902fd9d -> e4f7fb74e


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

Signed-off-by: wilderrodrigues <wrodrigues@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 <wrodrigues@schubergphilis.com>
Authored: Thu Jun 25 08:01:51 2015 +0200
Committer: wilderrodrigues <wrodrigues@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());
                             }
 


Mime
View raw message