Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6770217A7D for ; Sun, 28 Sep 2014 03:19:34 +0000 (UTC) Received: (qmail 77215 invoked by uid 500); 28 Sep 2014 03:19:34 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 77100 invoked by uid 500); 28 Sep 2014 03:19:34 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 77083 invoked by uid 99); 28 Sep 2014 03:19:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Sep 2014 03:19:34 +0000 Date: Sun, 28 Sep 2014 03:19:34 +0000 (UTC) From: "Bernd Eckenfels (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (POOL-278) Allow user provided efficient statistics implementations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/POOL-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14150913#comment-14150913 ] Bernd Eckenfels commented on POOL-278: -------------------------------------- I wanted to keep that outside of the scope of POOL-277 because it kind of resulted in a major restructuring without beeing able to proof performance benefits. And since its my first contribution, I kept it simple. I would make this a two step process, first make the interface public (so it can be performance tested as wenn), and then actually modify the implementation: It does looks like the updating formula but wrongly used (it asumes index=0 is the oldest entry which it is not). I don't like the current "last 100 values" approach anyway, as those values could cover from milliseconds to hours. So an approach with a timer (similiar to unix uptime) and knuth formular would be better. And finally, it would be need to specify something like a [metrics|https://dropwizard.github.io/metrics/] histogram object. (automatically registered to JMX and stuff). Or maybe integrate with Commons Math? > 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)