From 4d5b32b140d73c409a004196cd9d930e9c28c7e3 Mon Sep 17 00:00:00 2001 From: Vladimir Dolzhenko Date: Wed, 30 Sep 2020 16:44:16 +0200 Subject: [PATCH] Clean up perf tests TC stats output --- .../test/org/jetbrains/kotlin/idea/perf/Stats.kt | 6 +++--- .../test/org/jetbrains/kotlin/idea/perf/StatsOutput.kt | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/Stats.kt b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/Stats.kt index 47aa58f26bc..98dd5de21fb 100644 --- a/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/Stats.kt +++ b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/Stats.kt @@ -186,7 +186,7 @@ class Stats( TeamCity.test(n, errors = listOf(t)) {} } else if (!printOnlyErrors) { val durationMs = (statInfo[TEST_KEY] as Long).nsToMs - TeamCity.test(n, durationMs = durationMs) { + TeamCity.test(n, durationMs = durationMs, includeStats = false) { for ((k, v) in statInfo) { if (k == TEST_KEY) continue (v as? Number)?.let { @@ -262,7 +262,7 @@ class Stats( phaseData.setUp(testData) } val attemptName = "${phaseData.testName} #$attempt" - logMessage { "$attemptName setup took $setUpMillis ms" } + //logMessage { "$attemptName setup took $setUpMillis ms" } val valueMap = HashMap(2 * PerformanceCounter.numberOfCounters + 1) statInfosArray[attempt] = valueMap @@ -287,7 +287,7 @@ class Stats( val tearDownMillis = measureTimeMillis { phaseData.tearDown(testData) } - logMessage { "$attemptName tearDown took $tearDownMillis ms" } + //logMessage { "$attemptName tearDown took $tearDownMillis ms" } } catch (t: Throwable) { logMessage(t) { "error at tearDown of $attemptName" } valueMap[ERROR_KEY] = t diff --git a/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/StatsOutput.kt b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/StatsOutput.kt index 03dbbe5f897..93f533f478a 100644 --- a/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/StatsOutput.kt +++ b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/StatsOutput.kt @@ -34,8 +34,10 @@ internal fun Metric.writeTeamCityStats(name: String, rawMeasurementName: String } else { if (depth == 0 && this.name != Stats.GEOM_MEAN) "$prefix: ${this.name}" else "$prefix ${this.name}" }.trim() - value?.let { - TeamCity.statValue(s, it) + if (s != prefix) { + value?.let { + TeamCity.statValue(s, it) + } } for (childIndex in children.withIndex()) { if (!rawMetrics && childrenName == rawMeasurementName && childIndex.index > 0) break