Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18083#discussion_r118413115
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/LiveListenerBus.scala ---
    @@ -226,3 +240,34 @@ private[spark] object LiveListenerBus {
       val name = "SparkListenerBus"
     }
     
    +private[spark] class LiveListenerBusMetrics(queue: LinkedBlockingQueue[_]) 
extends Source {
    +  override val sourceName: String = "LiveListenerBus"
    +  override val metricRegistry: MetricRegistry = new MetricRegistry
    +
    +  /**
    +   * The total number of events posted to the LiveListenerBus. This counts 
the number of times
    +   * that `post()` is called, which might be less than the total number of 
events processed in
    +   * case events are dropped.
    +   */
    +  val numEventsReceived: Counter = 
metricRegistry.counter(MetricRegistry.name("numEventsReceived"))
    +
    +  /**
    +   * The total number of events that were dropped without being delivered 
to listeners.
    +   */
    +  val numDroppedEvents: Counter = 
metricRegistry.counter(MetricRegistry.name("numEventsDropped"))
    +
    +  /**
    +   * The amount of time taken to post a single event to all listeners.
    +   */
    +  val eventProcessingTime: Timer = 
metricRegistry.timer(MetricRegistry.name("eventProcessingTime"))
    +
    +  /**
    +   * The number of of messages waiting in the queue.
    +   */
    +  val queueSize: Gauge[Int] = {
    --- End diff --
    
    do we need this metric? Users can easily get it by looking at the 
`spark.scheduler.listenerbus.eventqueue.size` config.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to