public void recordCounter(ServerStatus serverStatus, String name, int counter) { if (shouldNotRecord(serverStatus)) return; lazyInitRecordings(); recordings.add(Recording.counter(name, counter)); }
// helper methods to optionally record timing information per message, useful for debugging or // benchmarking // not thread safe! public void recordTiming(ServerStatus serverStatus, String name, long elapsedNanos) { if (shouldNotRecord(serverStatus)) return; lazyInitRecordings(); recordings.add(Recording.timing(name, elapsedNanos)); }