[
https://issues.apache.org/jira/browse/SAMZA-349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14127713#comment-14127713
]
Martin Kleppmann commented on SAMZA-349:
----------------------------------------
I think we don't need to change anything right now — the timer metric is useful
as it is. However, if in future we want to turn it on by default (e.g. include
the duration of StreamTask.process() calls in the default metrics), we may need
to do some work to reduce memory use.
bq. But when the the metrics are reported in a smaller interval, such as 30s or
10s, this implementation may have a problem.
Not necessarily — it would just mean that the aggregation window length is
approximate. If you're reporting a metric every 30 seconds, and averaging over
5 or 6 one-minute buckets, then the window length may sometimes be 5 mins 30
secs instead of the intended 5 mins. In most circumstances that wouldn't have
any noticeable effect on the numbers.
> 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.2.patch, SAMZA-349.3.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.3.4#6332)