add stat service

This commit is contained in:
wenshao
2012-08-04 08:01:22 +08:00
parent 2b2eb9ee82
commit 33f2b2948a
3 changed files with 7 additions and 3 deletions
@@ -301,7 +301,7 @@ public class JdbcStatManager implements JdbcStatManagerMBean {
for (DataSourceProxyImpl dataSource : DruidDriver.getProxyDataSources().values()) {
Map<String, JdbcSqlStat> statMap = dataSource.getDataSourceStat().getSqlStatMap();
for (Map.Entry<String, JdbcSqlStat> entry : statMap.entrySet()) {
if (entry.getValue().getExecuteCount() == 0) {
if (entry.getValue().getExecuteCount() == 0 && entry.getValue().getRunningCount() == 0) {
continue;
}
@@ -314,7 +314,7 @@ public class JdbcStatManager implements JdbcStatManagerMBean {
for (DruidDataSource dataSource : DruidDataSourceStatManager.getDruidDataSourceInstances()) {
Map<String, JdbcSqlStat> statMap = dataSource.getDataSourceStat().getSqlStatMap();
for (Map.Entry<String, JdbcSqlStat> entry : statMap.entrySet()) {
if (entry.getValue().getExecuteCount() == 0) {
if (entry.getValue().getExecuteCount() == 0 && entry.getValue().getRunningCount() == 0) {
continue;
}