Damlification of metrics prefix (#9665)

* Damlification of metrics prefix.
CHANGELOG_BEGIN
CHANGELOG_END

* Fixed reference to metrics prefix.

CHANGELOG_BEGIN
CHANGELOG_END
This commit is contained in:
Miklos 2021-10-11 21:00:27 +02:00 committed by GitHub
parent 3115d104aa
commit 7a54ca1926
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ final class ExposedMetrics[T](
}
object ExposedMetrics {
private val Prefix: MetricName = MetricName.DAML :+ "bench_tool"
private val Prefix: MetricName = MetricName.Daml :+ "bench_tool"
case class CounterMetric[T](counter: Counter, countingFunction: T => Long)
case class BytesProcessedMetric[T](bytesProcessed: Counter, sizingFunction: T => Long)

View File

@ -15,7 +15,7 @@ final class MetricName(private val segments: Vector[String]) extends AnyVal {
object MetricName {
val DAML: MetricName = MetricName("daml")
val Daml: MetricName = MetricName("daml")
def apply(segments: String*): MetricName =
new MetricName(segments.toVector)

View File

@ -20,7 +20,7 @@ final class Metrics(val registry: MetricRegistry) {
}
object daml {
private val Prefix: MetricName = MetricName.DAML
private val Prefix: MetricName = MetricName.Daml
object commands {
private val Prefix: MetricName = daml.Prefix :+ "commands"

View File

@ -14,7 +14,7 @@ class PackageSpec extends AsyncWordSpec with Matchers {
"succeed on multiple threads in parallel for the same metric name" in {
val registry = new MetricRegistry
implicit val executionContext: ExecutionContext = ExecutionContext.global
val metricName = MetricName.DAML :+ "a" :+ "test"
val metricName = MetricName.Daml :+ "a" :+ "test"
val instances =
(1 to 1000).map(_ => Future(registerGauge(metricName, () => () => 1.0, registry)))
Future.sequence(instances).map { _ =>

View File

@ -32,6 +32,6 @@ package object kvutils {
type CorrelationId = String
val MetricPrefix: MetricName = MetricName.DAML :+ "kvutils"
val MetricPrefix: MetricName = MetricName.Daml :+ "kvutils"
}