[
https://issues.apache.org/jira/browse/SAMZA-251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14069179#comment-14069179
]
Chris Riccomini commented on SAMZA-251:
---------------------------------------
The logic of this patch looks good to me. Two points of feedback.
1. The clock for RunLoop should be injectable (passed in as a constructor
parameter) so it's more unit-testable. See MetricsSnapshotReporter.scala for an
example.
2. This patch can be improved by using a more idiomatic-scala style
implementation. A trait that takes a clock in the constructor, and has a time()
method that takes a metric and a code block, would be a good way to implement
this. In such a case, the code would look like:
{code}
def process {
time(metrics.processMs) {
// normal process logic
}
}
{code}
> Add metrics for choose/process/window/commit/send time
> ------------------------------------------------------
>
> Key: SAMZA-251
> URL: https://issues.apache.org/jira/browse/SAMZA-251
> Project: Samza
> Issue Type: Bug
> Components: metrics
> Affects Versions: 0.6.0
> Reporter: Chris Riccomini
> Assignee: Yan Fang
> Labels: newbie
> Fix For: 0.8.0
>
> Attachments: SAMZA-251.patch
>
>
> We should add the following counter metrics:
> * choose-ms
> * window-ms
> * process-ms
> * commit-ms
> * send-ms
> This will allow us to see how much time is being spent (per second) in each
> block of code.
> I think all of these metrics should be added at the SamzaContainer level, and
> all except choose-ms should be done at the TaskInstance level.
--
This message was sent by Atlassian JIRA
(v6.2#6252)