From 84a1e92483e6488b35cca0d9fda97517addd1e99 Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Sun, 20 Nov 2022 00:54:29 +0100 Subject: [PATCH] [performance tests] don't use printf to log values `printf` uses a locale to print values. double value is rendered as `0,1234` in the German locale. And TeamCity fails to parse such a presentation back to double. GitOrigin-RevId: 7bc8d9e65a09eef69e77cb0ee5fbb48be3713762 --- .../src/com/jetbrains/performancePlugin/Timer.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/performanceTesting/src/com/jetbrains/performancePlugin/Timer.java b/plugins/performanceTesting/src/com/jetbrains/performancePlugin/Timer.java index 1ca3ba386f33..1eb39faaf91c 100644 --- a/plugins/performanceTesting/src/com/jetbrains/performancePlugin/Timer.java +++ b/plugins/performanceTesting/src/com/jetbrains/performancePlugin/Timer.java @@ -150,16 +150,14 @@ public class Timer { @SuppressWarnings("UseOfSystemOutOrSystemErr") private static void logValue(String key, long value) { if (value >= 0L) { - System.out.printf("##teamcity[buildStatisticValue key='%s' value='%d']", key, value); - System.out.println(); + System.out.println("##teamcity[buildStatisticValue key='" + key + "' value='" + value + "']"); } } @SuppressWarnings("UseOfSystemOutOrSystemErr") private static void logValue(String key, double value) { if (value >= 0L) { - System.out.printf("##teamcity[buildStatisticValue key='%s' value='%f']", key, value); - System.out.println(); + System.out.println("##teamcity[buildStatisticValue key='"+ key + "' value='" + value + "']"); } } }