You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of capturing a moving average on the sending thread (causing lock contention on high-volume streams), consider off-loading the calculation to when the statistic is accessed instead (requires keeping n elapsed times in a FIFO collection or similar).
For high-volume streams, consider batching the response time over n messages, to avoid a StopWatch.start()/stop() on every send.
I have been prototyping with bounded linked lists to retain the channel stats histories and, sending 100M (nulls) to NullChannel (which essentially just collects stats). With the new code, I am getting a send rate of 5.3 million/second. With the existing implementation, it's 2.5 M/sec.
This is on master; the same test on 4.1.x (proxies, old stats) yields 1.2 million/second.
At a minimum, we should make the Exponential* instances used the default metrics implementation pluggable and provide these as alternatives LazyExponential* or similar.
Gary Russell opened INT-3641 and commented
StopWatch.start()/stop()
on every send.This issue is a sub-task of #7589
Referenced from: pull request #1386
The text was updated successfully, but these errors were encountered: