@Override public void messageSent(final IoSession session, final Object message) { m_log.debug("Sent local TURN message number: {}", session.getWrittenMessages()); }
public void messageSent(final IoSession session, final Object message) { m_log.debug("Sent local TURN message number: {}", session.getWrittenMessages()); }
public void operationComplete(final IoFuture future) { if (LOG.isDebugEnabled()) { final IoSession sess = future.getSession(); LOG.debug("Wrote messages: "+ sess.getWrittenMessages() + " on session " + sess); } }
@Override public void messageSent(final IoSession session, final Object message) throws Exception { m_log.debug("TCP frame messages sent: {}",session.getWrittenMessages()); m_log.debug("TCP frame bytes sent: {}", session.getWrittenBytes()); super.messageSent(session, message); }
sessStat.lastByteWrite = session.getWrittenBytes(); sessStat.lastMessageRead = session.getReadMessages(); sessStat.lastMessageWrite = session.getWrittenMessages(); .getWrittenMessages() - sessStat.lastMessageWrite) / (pollingInterval / 1000f); tmpMsgWrittenThroughput += sessStat.messageWrittenThroughput;
private void removeSession(IoSession session) { // remove the session from the list of polled sessions polledSessions.remove(session); // add the bytes processed between last polling and session closing // prevent non seen byte with non-connected protocols like HTTP and datagrams IoSessionStat sessStat = (IoSessionStat) session.getAttribute(KEY); // computing with time between polling and closing long currentTime = System.currentTimeMillis(); synchronized (calcLock) { bytesReadThroughput += (session.getReadBytes() - sessStat.lastByteRead) / ((currentTime - sessStat.lastPollingTime) / 1000f); bytesWrittenThroughput += (session.getWrittenBytes() - sessStat.lastByteWrite) / ((currentTime - sessStat.lastPollingTime) / 1000f); msgReadThroughput += (session.getReadMessages() - sessStat.lastMessageRead) / ((currentTime - sessStat.lastPollingTime) / 1000f); msgWrittenThroughput += (session.getWrittenMessages() - sessStat.lastMessageWrite) / ((currentTime - sessStat.lastPollingTime) / 1000f); } session.removeAttribute(KEY); }