@Override public KeyValueStats getStats(Map<String, Object> stats) { stats.put(Utils.qualify(this, KEY_ACTIVITY_COUNT), activityCount.get()); stats.put(Utils.qualify(this, KEY_EVENT_COUNT), eventCount.get()); stats.put(Utils.qualify(this, KEY_MSG_COUNT), msgCount.get()); stats.put(Utils.qualify(this, KEY_SNAPSHOT_COUNT), snapCount.get()); stats.put(Utils.qualify(this, KEY_ERROR_COUNT), errorCount.get()); stats.put(Utils.qualify(this, KEY_NOOP_COUNT), noopCount.get()); stats.put(Utils.qualify(this, KEY_DROP_COUNT), dropCount.get()); stats.put(Utils.qualify(this, KEY_ACTIVITIES_STARTED), pushCount.get()); stats.put(Utils.qualify(this, KEY_ACTIVITIES_STOPPED), popCount.get()); stats.put(Utils.qualify(this, KEY_STACK_DEPTH), getStackSize()); stats.put(Utils.qualify(this, KEY_OVERHEAD_USEC), overheadNanos.get() / 1000); if (eventSink != null) { eventSink.getStats(stats); } return this; }