Last active
May 6, 2021 19:25
-
-
Save dimastatz/d970347cd15f24ab13b9a3b94d66c6df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.spark.metrics.source | |
import com.codahale.metrics._ | |
object LegionMetrics { | |
val metrics = new LegionMetrics | |
} | |
class LegionMetrics extends Source { | |
override val sourceName: String = "LegionCommonSource" | |
override val metricRegistry: MetricRegistry = new MetricRegistry | |
val runTime: Histogram = metricRegistry.histogram(MetricRegistry.name("legionCommonRuntime")) | |
val totalEvents: Counter = metricRegistry.counter(MetricRegistry.name("legionCommonTotalEventsCount")) | |
val totalErrors: Counter = metricRegistry.counter(MetricRegistry.name("legionCommonTotalErrorsCount")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment