Remove BuildStatsService.applyIfInitialized outside BuildFlowService

#KT-58768 In Progress
This commit is contained in:
Nataliya.Valtman
2023-10-25 13:07:49 +02:00
committed by Space Team
parent 62ebb9932f
commit c332e1beb5
21 changed files with 454 additions and 364 deletions
@@ -21,7 +21,7 @@ class BuildSessionLogger(
private val maxFileSize: Long = DEFAULT_MAX_PROFILE_FILE_SIZE,
private val maxFileAge: Long = DEFAULT_MAX_FILE_AGE,
private val forceValuesValidation: Boolean = false,
) : IStatisticsValuesConsumer {
) : StatisticsValuesConsumer {
companion object {
const val STATISTICS_FOLDER_NAME = "kotlin-profile"
@@ -16,7 +16,7 @@ import java.nio.file.Paths
import java.nio.file.StandardOpenOption
import java.util.*
class MetricsContainer(private val forceValuesValidation: Boolean = false) : IStatisticsValuesConsumer {
class MetricsContainer(private val forceValuesValidation: Boolean = false) : StatisticsValuesConsumer {
data class MetricDescriptor(val name: String, val projectHash: String?) : Comparable<MetricDescriptor> {
override fun compareTo(other: MetricDescriptor): Int {
val compareNames = name.compareTo(other.name)
@@ -5,9 +5,10 @@
package org.jetbrains.kotlin.statistics.metrics
import java.io.Serializable
import java.util.*
interface IMetricContainer<T> {
interface IMetricContainer<T> : Serializable {
fun addValue(t: T, weight: Long? = null)
fun toStringRepresentation(): String
@@ -5,7 +5,7 @@
package org.jetbrains.kotlin.statistics.metrics
interface IStatisticsValuesConsumer {
interface StatisticsValuesConsumer {
fun report(metric: BooleanMetrics, value: Boolean, subprojectName: String? = null, weight: Long? = null): Boolean
fun report(metric: NumericalMetrics, value: Long, subprojectName: String? = null, weight: Long? = null): Boolean