jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3040) JMX Stats for the Session
Date Mon, 15 Aug 2011 14:40:27 GMT

    [ https://issues.apache.org/jira/browse/JCR-3040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085105#comment-13085105
] 

Thomas Mueller commented on JCR-3040:
-------------------------------------

A few remarks:

I don't really understand the statistics, but it looks like the patch made things 10% slower?
Is that so? If yes, I don't understand why. Or did I missinterpret the statistics?

As far as I understand the code, "opsPerSecond" is the number of operations per second that
were called between the first operation and the last operation. Right? For me, that was a
bit confusing. I would expect it to mean number of operations divided by the number of seconds
the operations took. Otherwise the number of "operations per second" doesn't actually depend
on the performance of the write operations, but on how often the _application_ wrote. At least
it should be documented:

CoreStatManagerMBean doesn't contain any Javadocs.

I would also return the total number of read and the total number of write operations.

Do you really need to use read and write locks? It seems using volatile fields should be enough,
as statistics are not supposed to be completely accurate anyway, but gathering statistics
is supposed to be low-overhead (read write locks are not).

> System.currentTimeMillis() - timeNs / 1000

I would try to avoid divisions when _gathering_ data, as divisions are slow. Why not use System.nanoTime()?
System.currentTimeMillis() is anyway problematic: it can go backwards, as uses the system
time and not the elapsed time. Statistics will be completely wrong on summertime change, right?

> BigDecimal

I don't really understand why 'double' isn't enough.

> (non-Javadoc) ...

What is the reason for adding such comments?

+        if (durationMs == 0) {
+            durationMs = 1000;
+        }

I know you want to avoid 'divide by zero' but it might be easier to set the _results_ to 0
instead of changing the duration.



> JMX Stats for the Session
> -------------------------
>
>                 Key: JCR-3040
>                 URL: https://issues.apache.org/jira/browse/JCR-3040
>             Project: Jackrabbit Content Repository
>          Issue Type: Sub-task
>          Components: jackrabbit-core
>            Reporter: Alex Parvulescu
>            Assignee: Alex Parvulescu
>         Attachments: JCR-3040.patch, jr-test.log
>
>
> I've named them Core stats. This will include:
>  - number of sessions currently opened
>  - session read / write operations per second
> The stats refresh once a minute.
> This is disabled by default, so it will not affect performance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message