Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI #6891] Fix get existing gauge issue
### Why are the changes needed? For the `com.codahale.metrics.MetricRegistry::gauge`. It `getOrAdd` the gauge with name. ``` public <T extends Gauge> T gauge(String name) { return (Gauge)this.getOrAdd(name, MetricRegistry.MetricBuilder.GAUGES); } ``` So we have to get all the gauges to check whether the gauge exists. ### How was this patch tested? UT. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #6891 from turboFei/gauge_exists. Closes #6891 18be2a5 [Wang, Fei] o(1) 039e7b5 [Wang, Fei] check existing gauge 32dce6f [Wang, Fei] check gauge exists Authored-by: Wang, Fei <[email protected]> Signed-off-by: Wang, Fei <[email protected]>
- Loading branch information