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

Yan Fang commented on SAMZA-349:
--------------------------------

RB: https://reviews.apache.org/r/24141/

1) use the same logic as the 
[Timer|https://github.com/dropwizard/metrics/blob/master/metrics-core/src/main/java/com/codahale/metrics/Timer.java]
 in Yammer Metrics' but simplify it a little by getting rid of 
[Meter|https://github.com/dropwizard/metrics/blob/master/metrics-core/src/main/java/com/codahale/metrics/Meter.java]
 and 
[Histogram|https://github.com/dropwizard/metrics/blob/master/metrics-core/src/main/java/com/codahale/metrics/Histogram.java]

2) since I am using the same logic, some code is very similar to what Yammer 
Metrics has, especially the 
[Reservoir|https://github.com/dropwizard/metrics/blob/master/metrics-core/src/main/java/com/codahale/metrics/Reservoir.java]
 interface which is too simple to make changes. Should it be fine? Yammer 
Metrics has the Apache 2.0 license.
  
3) adding the Timer actually changes the API, have to modify the samza-core and 
samza-yarn reports (detail is in RB).

4) TODO: current only report the average duration in 5 mins. Should report 
max/min duration in the 5 mins as well. This can be accomplished in a separate 
ticket because it's about reporting result, not "adding Timer".

Thank you. 

> add timer in metrics
> --------------------
>
>                 Key: SAMZA-349
>                 URL: https://issues.apache.org/jira/browse/SAMZA-349
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Yan Fang
>            Assignee: Yan Fang
>         Attachments: SAMZA-349.1.patch, SAMZA-349.patch, SAMZA-349.patch
>
>
> If my understanding is correct, the metrics we provide are for every 60 
> seconds and all counters will be reset every 60 seconds. Current the 
> MetricsSnapshotReporter seems missing this implementation. It sends out the 
> metrics every 60 seconds but does not reset the counter value.
> {code}
>  registry.getGroup(group).foreach {
>           case (name, metric) =>
>             metric.visit(new MetricsVisitor {
>               def counter(counter: Counter) = groupMsg.put(name, 
> counter.getCount: java.lang.Long)
>               def gauge[T](gauge: Gauge[T]) = groupMsg.put(name, 
> gauge.getValue.asInstanceOf[Object])
>             })
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to