|
69 | 69 | public class Main { |
70 | 70 | private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); |
71 | 71 |
|
72 | | - // Startup timing field |
73 | 72 | private static volatile Instant startupBeginTime; |
74 | | - |
75 | 73 | private final JsonObject config; |
76 | 74 | private final Vertx vertx; |
77 | 75 | private final ApplicationVersion appVersion; |
@@ -248,25 +246,11 @@ private KeyManager getKeyManager() { |
248 | 246 | return new KeyManager(this.keysetKeyStore, this.keysetProvider); |
249 | 247 | } |
250 | 248 |
|
251 | | - /** |
252 | | - * Calculate startup duration following established codebase patterns. |
253 | | - * @return Duration from startup begin to completion, or null if timing data is invalid |
254 | | - */ |
255 | | - private static Duration getStartupDuration() { |
256 | | - if (startupBeginTime == null) { |
257 | | - return null; |
258 | | - } |
259 | | - return Duration.between(startupBeginTime, Instant.now()); |
260 | | - } |
261 | | - |
262 | 249 | public static void recordStartupComplete() { |
263 | | - final Duration d = getStartupDuration(); |
264 | | - if (d == null) return; |
265 | | - Timer |
266 | | - .builder("uid2_operator_startup_duration") |
267 | | - .register(globalRegistry) |
268 | | - .record(d); |
269 | | - LOGGER.info("Operator startup completed in {} seconds", String.format("%.3f", d.toMillis() / 1000.0)); |
| 250 | + if (startupBeginTime == null) return; |
| 251 | + final Duration d = Duration.between(startupBeginTime, Instant.now()); |
| 252 | + Timer.builder("uid2_operator_startup_duration").register(globalRegistry).record(d); |
| 253 | + LOGGER.info("Startup in {} ms", d.toMillis()); |
270 | 254 | } |
271 | 255 |
|
272 | 256 | public static void main(String[] args) throws Exception { |
|
0 commit comments