Description
StatCollector#addSession and StatCollector#removeSession are blocking the entire object. Therefore under heavy load of new sessions or remove of sessions we will have a bottleneck. Instead we can take advantage of "new" Java 5 concurrent util classes.
Throughput is incorrectly being estimated. It is missing packets/bytes and when dealing with a very big number of sessions the rate will be off. Instead of keeping stats of throughput we can just stats of total traffic.So stats will change from --> to
MsgWrittenThroughput --> totalMsgWritten
MsgReadThroughput --> totalMsgRead
BytesWrittenThroughput --> totalBytesWritten
BytesReadThroughput --> totalBytesRead
The rate can then be estimated by the client of this class. We can add 2 new stats that are very helpful (at least to me):
1) scheduled writes: Number of current scheduled writes for all existing sessions.
2) queueved events: Number of current queued events for all existing sessions.
Stat #1 can always be estimated. However stat #2 can only be estimated when the ExecutorFilter is present in the filter chain.
Attachments
Attachments
Issue Links
- incorporates
-
DIRMINA-331 StatCollector is not thread safe and some stats are being mixed up
- Closed