jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Parvulescu <alex.parvule...@gmail.com>
Subject Re: RepositoryStatistics question
Date Thu, 16 Feb 2012 14:15:37 GMT
Hi Mete,

The answer depends on the implementation, and as you can see on the wiki
page [0] these two counters have not been implemented yet :)

You have 2 options here:

1) is what you listed above: you provide an incremental implementation
where each time there is a change to the number of bundles, you push that
info to the counter via the #addAndGet(long delta) method.
In this case, yes we should change to non-incremental.

or

2) similar to BUNDLE_CACHE_SIZE_COUNTER you provide the absolute number
each time via #set(long newValue), possibly at a lower frequency that the
one at the actual updates come in.

So, as I've said it depends on the actual implementation and not having one
yet means that if you find it easier the other way around (#1) we can
switch without breaking anything.


best,
alex

[0] http://wiki.apache.org/jackrabbit/Statistics


On Thu, Feb 16, 2012 at 2:20 PM, Mete Atamel <matamel@adobe.com> wrote:

> Hi,
>
> I was looking at some of the values of Type enum in RepositoryStatistics
> class and these two caught my attention:
>
>         BUNDLE_COUNTER(true),
>
>         BUNDLE_WS_SIZE_COUNTER(true),
>
> I'm assuming BUNDLE_COUNTER is the current number of nodes/bundles and
> BUNDLE_WS_SIZE_COUNTER is the total size of all nodes/bundles in the
> workspace (correct me if I'm wrong). The problem is that these enums are
> initialized with true, meaning they will reset their counts to zero every
> second and this is kind of weird.
>
> For example, if 100 nodes are created at time 1 and time 3, you'd see
> something like this for BUNDLE_COUNTER: 100, 0, 100, 0, 0, ... But I'd
> expect to see 100, 100, 200, 200, 200, … Because BUNDLE_COUNT sounds like
> the total number of nodes at the current time rather than new bundles
> created at the current time. If it were named NEW_BUNDLE_COUNT, I'd expect
> to see 100, 0, 100, 0, 0, …Same goes for BUNDLE_WS_SIZE_COUNTER.
>
> So, I'm suggesting that we change these enum values to initialize with
> false instead and I'm curious to know what everyone else thinks.
>
> Thanks,
> Mete
>

Mime
View raw message