
ru.tinkoff.plugins.buildmetrics.system.SetupBuildMetricsExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of build-metrics-system Show documentation
Show all versions of build-metrics-system Show documentation
Extension for tinkoff build metrics gradle plugin.
The newest version!
package ru.tinkoff.plugins.buildmetrics.system
import ru.tinkoff.plugins.buildmetrics.api.extensions.BuildMetricsExtension
import ru.tinkoff.plugins.buildmetrics.api.extensions.handlers.LabelsHandler
import ru.tinkoff.plugins.buildmetrics.api.extensions.handlers.MetricsHandler
import ru.tinkoff.plugins.buildmetrics.system.labels.CpuLabelsFactory
import ru.tinkoff.plugins.buildmetrics.system.labels.MemoryLabelsFactory
import ru.tinkoff.plugins.buildmetrics.system.labels.OsLabelsFactory
import ru.tinkoff.plugins.buildmetrics.system.metrics.GCDurationMetricFactory
fun MetricsHandler.addSystemMetrics() {
add(GCDurationMetricFactory())
}
fun LabelsHandler.addSystemLabels() {
add(CpuLabelsFactory())
add(MemoryLabelsFactory())
add(OsLabelsFactory())
}
@Suppress("unused")
fun BuildMetricsExtension.addSystemMetricsAndLabels() {
metrics {
addSystemMetrics()
}
labels {
addSystemLabels()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy