class Statistics {

    private final Instant startTime;

    public Statistics() {
      startTime = Instant.now();
  }

    /**
     * Log a message with duration using provided logger if the supplied log level is active.
     * @param logger logger instance
     * @param logLevel log level
     * @param msg message string
     * @param duration duration to report
     * @return whether logging was performed
     */
    private boolean logIt(Logger logger, Level logLevel, String msg, Duration duration) {<FILL_FUNCTION_BODY>}

    /**
     * Log a message along with how much time it took since the constructor was called.
     * @param logger logger instance
     * @param logLevel log level
     * @param msg message string
     * @return whether logging was performed
     */
    public boolean report(Logger logger, Level logLevel, String msg) {
        return logIt(logger, logLevel, msg, Duration.between(startTime, Instant.now()));
    }

    /**
     * Log a message along with how much time it took since the constructor was called.
     * If there is a metrics registry, it will update the timer specified by the meter name.
     * @param logger logger instance
     * @param logLevel log level
     * @param msg message string
     * @param meterName name of the meter
     * @return whether logging was performed
     * @see Metrics#getRegistry()
     */
    public boolean report(Logger logger, Level logLevel, String msg, String meterName) {
        return report(logger, logLevel, msg, meterName, new String[]{});
    }

    /**
     * Log a message along with how much time it took since the constructor was called.
     * If there is a metrics registry, it will update the timer specified by the meter name.
     * @param logger logger instance
     * @param logLevel log level
     * @param msg message string
     * @param meterName name of the meter
     * @param tags array of tags for the meter
     * @return whether logging was performed
     * @see Metrics#getRegistry()
     */
    public boolean report(Logger logger, Level logLevel, String msg, String meterName, String[] tags) {
        Duration duration = Duration.between(startTime, Instant.now());

        boolean ret = logIt(logger, logLevel, msg, duration);

        MeterRegistry registry = Metrics.getRegistry();
        if (registry != null) {
            Timer.builder(meterName).
                    tags(tags).
                    register(registry).
                    record(duration);
        }

        return ret;
    }

    /**
     * Log a message along with how much time it took since the constructor was called.
     * If there is a metrics registry, it will update the timer specified by the meter name.
     * The log level is {@code INFO}.
     * @param logger logger instance
     * @param msg message string
     * @param meterName name of the meter
     * @return whether logging was performed
     */
    public boolean report(Logger logger, String msg, String meterName) {
        return report(logger, Level.INFO, msg, meterName);
    }

    /**
     * log a message along with how much time it took since the constructor was called.
     * The log level is {@code INFO}.
     * @param logger logger instance
     * @param msg message string
     * @return whether logging was performed
     */
    public boolean report(Logger logger, String msg) {
        return report(logger, Level.INFO, msg);
    }
}

        if (logger.isLoggable(logLevel)) {
            String timeStr = StringUtils.getReadableTime(duration.toMillis());
            logger.log(logLevel, String.format("%s (took %s)", launderLog(msg), timeStr));
            return true;
        }

        return false;
    
<no_super_class>