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

Edward Ribeiro commented on ZOOKEEPER-2290:
-------------------------------------------

+1 Chris Conroy. 

**Also I think it is nice to expose those new metrics via JMX too.**

Liu Saohui, I think getRate() should return a double instead of a long 'cause 
it will round results otherwise. Also, TIMES_SLOT should be final too. I would 
rename it as TIME_SLOT_MS, btw. And you should put a 'default' case in the 
switch-case statement -- throwing a IllegalArgumentException, e.g. -- to make 
Findbugs happy.

Finally, no need to call updateLatency() on every op type: you can set the  
operation type (READ/WRITE) instead and call updateLatency() at the end. ;)

> Add read/write qps metrics in monitor cmd
> -----------------------------------------
>
>                 Key: ZOOKEEPER-2290
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2290
>             Project: ZooKeeper
>          Issue Type: Improvement
>    Affects Versions: 3.4.6
>            Reporter: Liu Shaohui
>            Priority: Minor
>              Labels: monitor
>             Fix For: 3.6.0
>
>         Attachments: ZOOKEEPER-2290-v1.patch, ZOOKEEPER-2290-v2.patch, 
> ZOOKEEPER-2290-v3.patch
>
>
> Read/write qps are important metrics to show the pressure of the cluster. We 
> can also use it to alert about some abuse of zookeeper.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to