Clean up perf tests TC stats output
This commit is contained in:
@@ -186,7 +186,7 @@ class Stats(
|
|||||||
TeamCity.test(n, errors = listOf(t)) {}
|
TeamCity.test(n, errors = listOf(t)) {}
|
||||||
} else if (!printOnlyErrors) {
|
} else if (!printOnlyErrors) {
|
||||||
val durationMs = (statInfo[TEST_KEY] as Long).nsToMs
|
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) {
|
for ((k, v) in statInfo) {
|
||||||
if (k == TEST_KEY) continue
|
if (k == TEST_KEY) continue
|
||||||
(v as? Number)?.let {
|
(v as? Number)?.let {
|
||||||
@@ -262,7 +262,7 @@ class Stats(
|
|||||||
phaseData.setUp(testData)
|
phaseData.setUp(testData)
|
||||||
}
|
}
|
||||||
val attemptName = "${phaseData.testName} #$attempt"
|
val attemptName = "${phaseData.testName} #$attempt"
|
||||||
logMessage { "$attemptName setup took $setUpMillis ms" }
|
//logMessage { "$attemptName setup took $setUpMillis ms" }
|
||||||
|
|
||||||
val valueMap = HashMap<String, Any>(2 * PerformanceCounter.numberOfCounters + 1)
|
val valueMap = HashMap<String, Any>(2 * PerformanceCounter.numberOfCounters + 1)
|
||||||
statInfosArray[attempt] = valueMap
|
statInfosArray[attempt] = valueMap
|
||||||
@@ -287,7 +287,7 @@ class Stats(
|
|||||||
val tearDownMillis = measureTimeMillis {
|
val tearDownMillis = measureTimeMillis {
|
||||||
phaseData.tearDown(testData)
|
phaseData.tearDown(testData)
|
||||||
}
|
}
|
||||||
logMessage { "$attemptName tearDown took $tearDownMillis ms" }
|
//logMessage { "$attemptName tearDown took $tearDownMillis ms" }
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
logMessage(t) { "error at tearDown of $attemptName" }
|
logMessage(t) { "error at tearDown of $attemptName" }
|
||||||
valueMap[ERROR_KEY] = t
|
valueMap[ERROR_KEY] = t
|
||||||
|
|||||||
@@ -34,8 +34,10 @@ internal fun Metric.writeTeamCityStats(name: String, rawMeasurementName: String
|
|||||||
} else {
|
} else {
|
||||||
if (depth == 0 && this.name != Stats.GEOM_MEAN) "$prefix: ${this.name}" else "$prefix ${this.name}"
|
if (depth == 0 && this.name != Stats.GEOM_MEAN) "$prefix: ${this.name}" else "$prefix ${this.name}"
|
||||||
}.trim()
|
}.trim()
|
||||||
value?.let {
|
if (s != prefix) {
|
||||||
TeamCity.statValue(s, it)
|
value?.let {
|
||||||
|
TeamCity.statValue(s, it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (childIndex in children.withIndex()) {
|
for (childIndex in children.withIndex()) {
|
||||||
if (!rawMetrics && childrenName == rawMeasurementName && childIndex.index > 0) break
|
if (!rawMetrics && childrenName == rawMeasurementName && childIndex.index > 0) break
|
||||||
|
|||||||
Reference in New Issue
Block a user