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

Joel Koshy commented on KAFKA-604:
----------------------------------

Couple other options that we discussed offline for KafkaTimer:

- Add the new multi-timer code to the object level
- Since the most common (only?) use-case is updating a specific and a global 
timer, have an additional Option[Timer] for the global timer in the constructor 
that defaults to None
- Currying. e.g.,

  def timeWith[A](timers: Timer*)(f: => A) = {
    val ctxSeq = timers.map(_.time())
    try {
      f
    }
    finally {
      ctxSeq.foreach(_.stop())
    }
  }

  and usage would be KafkaTimer.timeWith(specificTimer, globalTimer) { // block 
of code to time }

Clearly I'm obsessive compulsive :) but I think it would be good to avoid 
breaking the clean user-side syntax that the existing API allows.

                
> Add missing metrics in 0.8
> --------------------------
>
>                 Key: KAFKA-604
>                 URL: https://issues.apache.org/jira/browse/KAFKA-604
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>         Attachments: kafka_604_v1.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> It would be good if we add the following metrics:
> Producer: droppedMessageRate per topic
> ReplicaManager: partition count on the broker
> FileMessageSet: logFlushTimer per log (i.e., partition). Also, logFlushTime 
> should probably be moved to LogSegment since the flush now includes index 
> flush time.

--
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