String remoteAddr = sockAddr.getHostName() + ":" + sockAddr.getPort();
long interval = System.currentTimeMillis() - timeStamp;
if (interval < 0) interval = 0;
JStormHistogram netTransTime = networkTransmitTimeMap.get(remoteAddr);
if (netTransTime == null) {
netTransTime = Metrics.registerHistograms(remoteAddr, MetricDef.NETWORK_MSG_TRANS_TIME,
null, Metrics.MetricType.WORKER);
networkTransmitTimeMap.put(remoteAddr, netTransTime);
}
netTransTime.update(interval);
}
return ctrl_msg;
}