void (@NotNull final String traceName, long actual) { int indexOfBrace = name.getMethodName().indexOf("["); final String methodName = indexOfBrace > -1 ? name.getMethodName().substring(0, indexOfBrace) : name.getMethodName(); final String serviceMessage = String.format("##teamcity[buildStatisticValue key='trace.%s.%s.gradle-%s' value='%d']", methodName, traceName, gradleVersion, actual); System.out.println(serviceMessage); }