[
https://issues.apache.org/jira/browse/POOL-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14150890#comment-14150890
]
Phil Steitz commented on POOL-278:
----------------------------------
Why not just complete the fix for POOL-277 (removing sync on StatsStore)? The
mean calculation there looks like the Knuth updating formula, designed to
reduce cancellation error, though probably overkill given the small number of
values and range and the fact that it is not used as a streaming calculation.
If we remove the sync, we could make it do that though - i.e., update the mean
value each time and just return it directly in the getter. Outside sync scope
that is probably OK.
> Allow user provided efficient statistics implementations
> --------------------------------------------------------
>
> Key: POOL-278
> URL: https://issues.apache.org/jira/browse/POOL-278
> Project: Commons Pool
> Issue Type: Improvement
> Affects Versions: 2.3
> Reporter: Bernd Eckenfels
> Priority: Minor
> Labels: performance
>
> As discussed in POOL-277 there is some possibility to clean up the current
> StatsStore in impl/BaseGenericObjectPool. This would not only allow to get
> rid of the synchronized implementation and strange mean calculation, but also
> allow a user to register a faster or more complete statistics caluculation.
> For this I would suggest to make a Statisctics interface public and allow the
> user to register implementations of this interface for the various tracked
> metrics.
> This new interface should cover count, max, and mean. But the user can also
> directly use the object to ask it for percentile or other information.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)