Optional<String> writeTimer(Timer timer) {
        return Optional.of(writeDocument(timer, builder -> {
            builder.append(",\"count\":").append(timer.count());
            builder.append(",\"sum\":").append(timer.totalTime(getBaseTimeUnit()));
            builder.append(",\"mean\":").append(timer.mean(getBaseTimeUnit()));
            builder.append(",\"max\":").append(timer.max(getBaseTimeUnit()));
        }));
    }
Optional < String > writeTimer ( Timer timer ) { return Optional . of ( writeDocument ( timer , builder -> { builder . append ( ",\"count\":" ) . append ( timer . count ( ) ) ; builder . append ( ",\"sum\":" ) . append ( timer . totalTime ( getBaseTimeUnit ( ) ) ) ; builder . append ( ",\"mean\":" ) . append ( timer . mean ( getBaseTimeUnit ( ) ) ) ; builder . append ( ",\"max\":" ) . append ( timer . max ( getBaseTimeUnit ( ) ) ) ; } ) ) ; }
VisibleForTesting