Skip to content

Commit 83c81a6

Browse files
authored
add startup time in ms (#301)
1 parent 08bed7c commit 83c81a6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

avaje-jex/src/main/java/io/avaje/jex/core/BootstrapServer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ private BootstrapServer() {}
2424
private static final System.Logger log = AppLog.getLogger("io.avaje.jex");
2525

2626
public static Jex.Server start(Jex jex) {
27+
long startTime = System.currentTimeMillis();
2728
final var config = jex.config();
2829
if (config.health()) {
2930
jex.plugin(new HealthPlugin());
@@ -66,8 +67,9 @@ public static Jex.Server start(Jex jex) {
6667
jex.lifecycle().status(AppLifecycle.Status.STARTED);
6768
log.log(
6869
INFO,
69-
"Avaje Jex started {0} on {1}://{2}:{3,number,#}",
70+
"Avaje Jex started {0} in {1}ms on {2}://{3}:{4,number,#}",
7071
serverClass,
72+
System.currentTimeMillis() - startTime,
7173
scheme,
7274
actualAddress.getHostName(),
7375
actualAddress.getPort());
@@ -83,4 +85,4 @@ private static InetSocketAddress createSocketAddress(JexConfig config)
8385
final var inetAddress = config.host() == null ? null : InetAddress.getByName(config.host());
8486
return new InetSocketAddress(inetAddress, config.port());
8587
}
86-
}
88+
}

0 commit comments

Comments
 (0)