Replace some profiler.getDuration with profiler.getDurationInMillis after commit 5557ad55

This commit is contained in:
Wei Zhou 2015-08-21 13:36:27 +02:00
parent 614ee494ee
commit 662b478d45

View File

@ -572,7 +572,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C
} finally { } finally {
profiler.stop(); profiler.stop();
if (profiler.getDuration() >= HeartbeatInterval.value()) { if (profiler.getDurationInMillis() >= HeartbeatInterval.value()) {
if (s_logger.isDebugEnabled()) { if (s_logger.isDebugEnabled()) {
s_logger.debug("Management server heartbeat takes too long to finish. profiler: " + profiler.toString() + ", profilerHeartbeatUpdate: " + s_logger.debug("Management server heartbeat takes too long to finish. profiler: " + profiler.toString() + ", profilerHeartbeatUpdate: " +
profilerHeartbeatUpdate.toString() + ", profilerPeerScan: " + profilerPeerScan.toString()); profilerHeartbeatUpdate.toString() + ", profilerPeerScan: " + profilerPeerScan.toString());
@ -665,12 +665,12 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C
notifyNodeJoined(msg.getNodes()); notifyNodeJoined(msg.getNodes());
profiler.stop(); profiler.stop();
if (profiler.getDuration() > 1000) { if (profiler.getDurationInMillis() > 1000) {
if (s_logger.isDebugEnabled()) { if (s_logger.isDebugEnabled()) {
s_logger.debug("Notifying management server join event took " + profiler.getDuration() + " ms"); s_logger.debug("Notifying management server join event took " + profiler.getDurationInMillis() + " ms");
} }
} else { } else {
s_logger.warn("Notifying management server join event took " + profiler.getDuration() + " ms"); s_logger.warn("Notifying management server join event took " + profiler.getDurationInMillis() + " ms");
} }
} }
break; break;
@ -683,12 +683,12 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C
notifyNodeLeft(msg.getNodes()); notifyNodeLeft(msg.getNodes());
profiler.stop(); profiler.stop();
if (profiler.getDuration() > 1000) { if (profiler.getDurationInMillis() > 1000) {
if (s_logger.isDebugEnabled()) { if (s_logger.isDebugEnabled()) {
s_logger.debug("Notifying management server leave event took " + profiler.getDuration() + " ms"); s_logger.debug("Notifying management server leave event took " + profiler.getDurationInMillis() + " ms");
} }
} else { } else {
s_logger.warn("Notifying management server leave event took " + profiler.getDuration() + " ms"); s_logger.warn("Notifying management server leave event took " + profiler.getDurationInMillis() + " ms");
} }
} }
break; break;
@ -927,7 +927,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C
profiler.stop(); profiler.stop();
if (profiler.getDuration() >= HeartbeatInterval.value()) { if (profiler.getDurationInMillis() >= HeartbeatInterval.value()) {
if (s_logger.isDebugEnabled()) { if (s_logger.isDebugEnabled()) {
s_logger.debug("Peer scan takes too long to finish. profiler: " + profiler.toString() + ", profilerQueryActiveList: " + s_logger.debug("Peer scan takes too long to finish. profiler: " + profiler.toString() + ", profilerQueryActiveList: " +
profilerQueryActiveList.toString() + ", profilerSyncClusterInfo: " + profilerSyncClusterInfo.toString() + ", profilerInvalidatedNodeList: " + profilerQueryActiveList.toString() + ", profilerSyncClusterInfo: " + profilerSyncClusterInfo.toString() + ", profilerInvalidatedNodeList: " +