private void timePhase(final String name, final Runnable toTime) {
        long start = System.nanoTime();
        toTime.run();
        long end = System.nanoTime();

        logger().debug("Phase {} took {}ms", name, TimeUnit.NANOSECONDS.toMillis(end - start));
    }
Helper method which times an individual phase and logs it for debugging and optimization purposes.

@param name the name of the phase.
@param toTime the runnable that should be timed.
modules/couchbase/src/main/java/org/testcontainers/couchbase/CouchbaseContainer.java