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

Ivan Kelly commented on BOOKKEEPER-614:
---------------------------------------

Not necessarily. A string literal in one part of your code == a string literal 
in another part since java.lang.String maintains a pool of strings [1]. Of 
course, you could generate a string constant for each metric if the same metric 
is updated in multiple places, but for a metric only updated in one place, this 
isn't necessary.

It's a good observation though. I didn't take it into account with the 
BOOKKEEPER-615. I will do when I come to it again.

[1] http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#intern%28%29
                
> Generic stats interface, which multiple providers can be plugged into
> ---------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-614
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-614
>             Project: Bookkeeper
>          Issue Type: Improvement
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>             Fix For: 4.3.0
>
>         Attachments: 
> 0001-BOOKKEEPER-614-Generic-stats-interface-which-multipl.patch
>
>
> Currently we collect stats though JMX. Adding a new stat to JMX is 
> cumbersome, and reading the stats out of JMX is painful if you're not on the 
> same machine. As a consequence, we aren't measuring a fraction of the stuff 
> we should be.
> There are a couple of nice stats packages out there, such as twitter-stats[1] 
> and codahale metrics[2], which would make collection of stats much easier.
> This JIRA is to provide a generic interface, which a metrics backend can be 
> plugged into.
> [1] 
> https://github.com/twitter/commons/tree/master/src/java/com/twitter/common/stats
> [2] http://metrics.codahale.com/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to