Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add metrics support (Codahale) #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vladmihalcea
Copy link

add PoolingDataSource connection wait time histogram

add PoolingDataSource in-use connections histrogram

add PoolingDataSource connection wait time histogram

add PoolingDataSource in-use connections histrogram
@brettwooldridge
Copy link
Contributor

Vlad, so you consider this pull request ready? If so, I will start reviewing it in preparation for merging.

@vladmihalcea
Copy link
Author

Hi,

I think it is quite ready. I started a new "enhancement" in an attempt to find the right pool size.

This is the project: https://github.com/vladmihalcea/flexy-pool

I think it's also worth to have dedicated exceptions on BTM too.

So instead of BitronixRuntimeException("XA pool of resource ... still empty after ... wait time") we could have a ConnectionAcquireTimeoutException

What do you think?

Vlad

On Friday, March 21, 2014 10:52 AM, Brett Wooldridge [email protected] wrote:

Vlad, so you consider this pull request ready? If so, I will start reviewing it in preparation for merging.

Reply to this email directly or view it on GitHub.

@lorban
Copy link
Contributor

lorban commented Mar 23, 2014

Vlad,

Throwing more specific exceptions could be done, obviously as long as that
doesn't break anything. I'd recommend you to open a feature request and
start working on it in a branch if you don't mind.

BTW, you should probably add support for Brett's HikariCP connection pool
to your flexy-pool tool. :-)

Ludovic

On Fri, Mar 21, 2014 at 11:05 AM, Vlad Mihalcea [email protected]:

Hi,

I think it is quite ready. I started a new "enhancement" in an attempt to
find the right pool size.

This is the project: https://github.com/vladmihalcea/flexy-pool

I think it's also worth to have dedicated exceptions on BTM too.

So instead of BitronixRuntimeException("XA pool of resource ... still
empty after ... wait time") we could have a
ConnectionAcquireTimeoutException

What do you think?

Vlad

On Friday, March 21, 2014 10:52 AM, Brett Wooldridge <
[email protected]> wrote:

Vlad, so you consider this pull request ready? If so, I will start

reviewing it in preparation for merging.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com//pull/12#issuecomment-38262406
.

*
* @author Vlad Mihalcea
*/
public interface Metrics extends Serializable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why extending Serializable here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be removed.

@rankinc
Copy link
Contributor

rankinc commented Apr 5, 2014

Just to mention: we also use Codahale metrics in our BTM application, except we package them inside the WAR file. So abstracting the metrics from BTM strikes me as a Good Thing, because otherwise we would need to change how we deploy everything :-).

@vladmihalcea
Copy link
Author

Things to be done:

  1. TransactionManagerServices should expose the MetricsFactory is similar fashion with other Bitronix services
  2. Metrics are domain bound, so we only need one Metrics instance per current DataSource. The TransactionManagerServices should register all Metrics and close them during shutdown.
  3. No inner-class instantiator which is not thread-safe.
  4. Remove the serializable marker from Metrics.
  5. Rework unit tests to accommodate the new design.

I tried a first attempt to change those and tests were failing. I will try to find a way to fix those in the following weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants