add stat PreparedStatementCacheDeleteCount

This commit is contained in:
wenshao
2011-12-29 07:58:25 +08:00
parent 0a2d5f43c8
commit b7856ebc58
5 changed files with 129 additions and 2 deletions
@@ -187,6 +187,7 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
protected final AtomicLong preparedStatementCount = new AtomicLong();
protected final AtomicLong closedPreparedStatementCount = new AtomicLong();
protected final AtomicLong cachedPreparedStatementCount = new AtomicLong();
protected final AtomicLong cachedPreparedStatementDeleteCount = new AtomicLong();
protected final Histogram transactionHistogram = new Histogram(
10,
@@ -254,6 +255,14 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
public void decrementCachedPreparedStatementCount() {
cachedPreparedStatementCount.decrementAndGet();
}
public void incrementCachedPreparedStatementDeleteCount() {
cachedPreparedStatementDeleteCount.incrementAndGet();
}
public long getCachedPreparedStatementDeleteCount() {
return cachedPreparedStatementDeleteCount.get();
}
public long getCachedPreparedStatementCount() {
return cachedPreparedStatementCount.get();