@Override public void startStoredScope(String name) { if (threadLocalScopes.get().containsKey(name)) { threadLocalScopes.get().get(name).open(); } else { threadLocalScopes.get().put(name, new CodahaleMetricsScope(name)); } }
@Override public void startStoredScope(String name) { if (threadLocalScopes.get().containsKey(name)) { threadLocalScopes.get().get(name).open(); } else { threadLocalScopes.get().put(name, new CodahaleMetricsScope(name)); } }
/** * Instantiates a named scope - intended to only be called by Metrics, so locally scoped. * @param name - name of the variable */ private CodahaleMetricsScope(String name) { this.name = name; this.timer = CodahaleMetrics.this.getTimer(name); open(); }
/** * Instantiates a named scope - intended to only be called by Metrics, so locally scoped. * @param name - name of the variable */ private CodahaleMetricsScope(String name) { this.name = name; this.timer = CodahaleMetrics.this.getTimer(name); open(); }