@Disabled
    @Test
    void testLogExecutionTime() {
        int iterations = 100_000_000;
        int runs = 5;
        AtomicLong counter = new AtomicLong();

        for (int j = 0; j < runs; j++) {
            counter.set(0);
            LogExecutionTime outer = new LogExecutionTime();

            for (int i = 0; i < iterations; i++) {
                LogExecutionTime inner = new LogExecutionTime();
                counter.incrementAndGet();
                LOGGER.trace("Some message ", inner);
            }
            LOGGER.info("Outer LogExecutionTime {} {}", counter, outer);
        }

        for (int j = 0; j < runs; j++) {
            counter.set(0);
            LogExecutionTime outer = new LogExecutionTime();
            for (int i = 0; i < iterations; i++) {
                LOGGER.logDurationIfTraceEnabled(() -> {
                    counter.incrementAndGet();
                }, "some message");
            }
            LOGGER.info("Outer Lambda {} {}", counter, outer);
        }
    }
Seeing which execution timer was faster
stroom-meta/stroom-meta-impl-db/src/test/java/stroom/meta/impl/db/TestMetaServiceImpl.java