Skip to content

Commit e4f7fb7

Browse files
Using Profiler class, from the utils package, instead of System.currentTimeMillis()
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com> This closes apache#524
1 parent ea1f2eb commit e4f7fb7

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,15 @@ private void onSendingClusterPdu() {
261261
pdu.getSequenceId() + ", pdu ack seq: " + pdu.getAckSequenceId() + ", json: " + pdu.getJsonPackage());
262262
}
263263

264-
final long startTick = System.currentTimeMillis();
264+
final Profiler profiler = new Profiler();
265+
profiler.start();
266+
265267
final String strResult = peerService.execute(pdu);
268+
profiler.stop();
269+
266270
if (s_logger.isDebugEnabled()) {
267271
s_logger.debug("Cluster PDU " + getSelfPeerName() + " -> " + pdu.getDestPeer() + " completed. time: " +
268-
(System.currentTimeMillis() - startTick) + "ms. agent: " + pdu.getAgentId() + ", pdu seq: " + pdu.getSequenceId() +
272+
profiler.getDurationInMillis() + "ms. agent: " + pdu.getAgentId() + ", pdu seq: " + pdu.getSequenceId() +
269273
", pdu ack seq: " + pdu.getAckSequenceId() + ", json: " + pdu.getJsonPackage());
270274
}
271275

0 commit comments

Comments
 (0)