From 163f762ace22289704a8fe50e2297e5e4d9ca7cc Mon Sep 17 00:00:00 2001 From: Josiah Noel <32279667+SentryMan@users.noreply.github.com> Date: Wed, 17 Sep 2025 09:15:33 -0400 Subject: [PATCH] add startup time in ms --- .../src/main/java/io/avaje/jex/core/BootstrapServer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/avaje-jex/src/main/java/io/avaje/jex/core/BootstrapServer.java b/avaje-jex/src/main/java/io/avaje/jex/core/BootstrapServer.java index 2ddcd992..239c6b3c 100644 --- a/avaje-jex/src/main/java/io/avaje/jex/core/BootstrapServer.java +++ b/avaje-jex/src/main/java/io/avaje/jex/core/BootstrapServer.java @@ -24,6 +24,7 @@ private BootstrapServer() {} private static final System.Logger log = AppLog.getLogger("io.avaje.jex"); public static Jex.Server start(Jex jex) { + long startTime = System.currentTimeMillis(); final var config = jex.config(); if (config.health()) { jex.plugin(new HealthPlugin()); @@ -66,8 +67,9 @@ public static Jex.Server start(Jex jex) { jex.lifecycle().status(AppLifecycle.Status.STARTED); log.log( INFO, - "Avaje Jex started {0} on {1}://{2}:{3,number,#}", + "Avaje Jex started {0} in {1}ms on {2}://{3}:{4,number,#}", serverClass, + System.currentTimeMillis() - startTime, scheme, actualAddress.getHostName(), actualAddress.getPort()); @@ -83,4 +85,4 @@ private static InetSocketAddress createSocketAddress(JexConfig config) final var inetAddress = config.host() == null ? null : InetAddress.getByName(config.host()); return new InetSocketAddress(inetAddress, config.port()); } -} +} \ No newline at end of file