remove idleCount in druid plugin (#679)
This commit is contained in:
parent
eb1041675c
commit
bc20c6e888
|
|
@ -58,10 +58,9 @@ public class PoolingAddDruidDataSourceInterceptor implements StaticMethodsAround
|
|||
}
|
||||
|
||||
private Map<String, Function<DruidDataSourceMBean, Supplier<Double>>> getMetrics() {
|
||||
Map<String, Function<DruidDataSourceMBean, Supplier<Double>>> metricMap = new HashMap();
|
||||
Map<String, Function<DruidDataSourceMBean, Supplier<Double>>> metricMap = new HashMap<>();
|
||||
metricMap.put("activeCount", (DruidDataSourceMBean druidDataSource) -> () -> (double) druidDataSource.getActiveCount());
|
||||
metricMap.put("poolingCount", (DruidDataSourceMBean druidDataSource) -> () -> (double) druidDataSource.getPoolingCount());
|
||||
metricMap.put("idleCount", (DruidDataSourceMBean druidDataSource) -> () -> (double) (druidDataSource.getPoolingCount() - druidDataSource.getActiveCount()));
|
||||
metricMap.put("lockQueueLength", (DruidDataSourceMBean druidDataSource) -> () -> (double) druidDataSource.getLockQueueLength());
|
||||
metricMap.put("maxWaitThreadCount", (DruidDataSourceMBean druidDataSource) -> () -> (double) druidDataSource.getMaxWaitThreadCount());
|
||||
metricMap.put("commitCount", (DruidDataSourceMBean druidDataSource) -> () -> (double) druidDataSource.getCommitCount());
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ segmentItems:
|
|||
- {key: http.status_code, value: '200'}
|
||||
meterItems:
|
||||
- serviceName: druid-1.x-scenario
|
||||
meterSize: 14
|
||||
meterSize: 13
|
||||
meters:
|
||||
- meterId:
|
||||
name: datasource
|
||||
|
|
@ -220,12 +220,6 @@ meterItems:
|
|||
- {name: name, value: test_mysql-server:3306}
|
||||
- {name: status, value: poolingCount}
|
||||
singleValue: ge 0
|
||||
- meterId:
|
||||
name: datasource
|
||||
tags:
|
||||
- {name: name, value: test_mysql-server:3306}
|
||||
- {name: status, value: idleCount}
|
||||
singleValue: ge 0
|
||||
- meterId:
|
||||
name: datasource
|
||||
tags:
|
||||
|
|
|
|||
Loading…
Reference in New Issue