From add925e8aad50e4a31927374f9e719c20c406112 Mon Sep 17 00:00:00 2001 From: brunobat Date: Tue, 20 Jun 2023 17:07:53 +0100 Subject: [PATCH] build analytics improvements --- .../io/quarkus/runtime/BuildAnalyticsConfig.java | 2 +- .../src/main/java/io/quarkus/gradle/Prompter.java | 2 -- .../java/io/quarkus/gradle/tasks/QuarkusDev.java | 3 +-- .../quarkus/gradle/tasks/worker/BuildWorker.java | 14 +++++++------- .../src/main/java/io/quarkus/maven/DevMojo.java | 2 +- .../java/io/quarkus/maven/components/Prompter.java | 2 -- docs/src/main/asciidoc/build-analytics.adoc | 6 +++--- 7 files changed, 13 insertions(+), 18 deletions(-) diff --git a/core/runtime/src/main/java/io/quarkus/runtime/BuildAnalyticsConfig.java b/core/runtime/src/main/java/io/quarkus/runtime/BuildAnalyticsConfig.java index ff17d0c6cc2f6..e34b1a0e1af54 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/BuildAnalyticsConfig.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/BuildAnalyticsConfig.java @@ -30,5 +30,5 @@ public class BuildAnalyticsConfig { * The Timeout to send the build time analytics to segment. */ @ConfigItem(defaultValue = "3000") - public Optional timeout; + public Integer timeout; } diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/Prompter.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/Prompter.java index ed1d49a5e9113..085952ff180c6 100644 --- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/Prompter.java +++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/Prompter.java @@ -13,8 +13,6 @@ /** * Prompt implementation. - * - * @author Clement Escoffier */ public class Prompter { diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java index 688568d01e336..9124c1a7157aa 100644 --- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java +++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java @@ -1,8 +1,7 @@ package io.quarkus.gradle.tasks; import static io.quarkus.analytics.dto.segment.ContextBuilder.CommonSystemProperties.GRADLE_VERSION; -import static io.quarkus.analytics.dto.segment.TrackEventType.*; -import static java.util.Collections.*; +import static io.quarkus.analytics.dto.segment.TrackEventType.DEV_MODE; import java.io.BufferedWriter; import java.io.File; diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java index 8f0648f2f3060..e49d90db1c479 100644 --- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java +++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java @@ -100,35 +100,35 @@ public void execute() { } private static class Slf4JMessageWriter implements MessageWriter { - private final Logger LOGGER; + private final Logger logger; public Slf4JMessageWriter(final Logger logger) { - this.LOGGER = logger; + this.logger = logger; } @Override public void info(String msg) { - this.LOGGER.info(msg); + this.logger.info(msg); } @Override public void error(String msg) { - this.LOGGER.error(msg); + this.logger.error(msg); } @Override public boolean isDebugEnabled() { - return this.LOGGER.isDebugEnabled(); + return this.logger.isDebugEnabled(); } @Override public void debug(String msg) { - this.LOGGER.debug(msg); + this.logger.debug(msg); } @Override public void warn(String msg) { - this.LOGGER.warn(msg); + this.logger.warn(msg); } } } diff --git a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java index 4625ec038b02f..e204db0bf7218 100644 --- a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java +++ b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java @@ -3,7 +3,7 @@ import static io.quarkus.analytics.dto.segment.TrackEventType.DEV_MODE; import static io.smallrye.common.expression.Expression.Flag.LENIENT_SYNTAX; import static io.smallrye.common.expression.Expression.Flag.NO_TRIM; -import static java.util.Collections.*; +import static java.util.Collections.emptyMap; import static java.util.function.Predicate.not; import static org.twdata.maven.mojoexecutor.MojoExecutor.artifactId; import static org.twdata.maven.mojoexecutor.MojoExecutor.configuration; diff --git a/devtools/maven/src/main/java/io/quarkus/maven/components/Prompter.java b/devtools/maven/src/main/java/io/quarkus/maven/components/Prompter.java index fb1aca1c23d45..70637632be094 100644 --- a/devtools/maven/src/main/java/io/quarkus/maven/components/Prompter.java +++ b/devtools/maven/src/main/java/io/quarkus/maven/components/Prompter.java @@ -13,8 +13,6 @@ /** * Prompt implementation. - * - * @author Clement Escoffier */ public class Prompter { diff --git a/docs/src/main/asciidoc/build-analytics.adoc b/docs/src/main/asciidoc/build-analytics.adoc index ab968a42f47cd..6f1c211cde0b6 100644 --- a/docs/src/main/asciidoc/build-analytics.adoc +++ b/docs/src/main/asciidoc/build-analytics.adoc @@ -7,7 +7,7 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc :categories: analytics :summary: This guide presents what build analytics is and how to configure it. -The Quarkus team has limited knowledge, from Maven download numbers, of the remarkable growth of Quarkus and the number of users reporting issues/concerns. Still, we need more insight into the platforms, operating system, java combinations, and build tools our users employ. +The Quarkus team has limited knowledge, from Maven download numbers, of the remarkable growth of Quarkus and the number of users reporting issues/concerns. Still, we need more insight into the platforms, operating system, Java combinations, and build tools our users employ. The build analytics tool aims to provide us with this information. == How it works @@ -16,7 +16,7 @@ The build analytics tool aims to provide us with this information. *All data collected is anonymous*. There is no way to link this data back to an individual or organization. The intent is to learn about general patterns and trends; therefore, only anonymous data is needed. -*Collection is Disabled by default* You will be asked if you want to opt in to data collection the first time you use devMode. The console will wait for a few seconds for your input. +*Collection is disabled by default* You will be asked if you want to opt in to data collection the first time you use dev mode. The console will wait for a few seconds for your input. == This is the data being collected @@ -26,7 +26,7 @@ The build analytics tool aims to provide us with this information. * Quarkus version * Java version * GraalVM version -* Operating system details +* Operating system details: OS name, OS version and architecture * Build system details, such as Maven, Gradle, and so on. * If a CI system was detected * Country and timezone