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

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

This closes #524
This commit is contained in:
wilderrodrigues 2015-06-25 08:01:51 +02:00
parent ea1f2eb049
commit e4f7fb74ef

View File

@ -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());
}