// Record latencies on a "regular" basis. This will tend to record semi-reliably at
// each interval as long as the JVM doesn't stall.
executor.scheduleWithFixedDelay(new Recorder(), RECORDING_INTERVAL, RECORDING_INTERVAL, TimeUnit.NANOSECONDS);
histogramLogWriter = new HistogramLogWriter(fillInPidAndDate(defaultLogFileName));
histogramLogWriter.outputComment("[Logged with LatencyLoggingDemo]");
histogramLogWriter.outputLogFormatVersion();
uncorrectedHistogramLogWriter = new HistogramLogWriter(fillInPidAndDate(defaultUncorrectedLogFileName));
uncorrectedHistogramLogWriter.outputComment("[Logged with LatencyLoggingDemo (Raw)]");
uncorrectedHistogramLogWriter.outputLogFormatVersion();
reportingStartTime = System.currentTimeMillis();
// Force an interval sample right at the reporting start time (to start samples here):