add stat CachedPreparedStatementMissCount

This commit is contained in:
wenshao
2011-12-29 09:45:11 +08:00
parent cf7d2906ea
commit 4938016f86
3 changed files with 18 additions and 4 deletions
@@ -187,7 +187,8 @@ 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 AtomicLong cachedPreparedStatementDeleteCount = new AtomicLong();
protected final AtomicLong cachedPreparedStatementMissCount = new AtomicLong();
protected final Histogram transactionHistogram = new Histogram(
10,
@@ -255,11 +256,19 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
public void decrementCachedPreparedStatementCount() {
cachedPreparedStatementCount.decrementAndGet();
}
public void incrementCachedPreparedStatementDeleteCount() {
cachedPreparedStatementDeleteCount.incrementAndGet();
}
public void incrementCachedPreparedStatementMissCount() {
cachedPreparedStatementMissCount.incrementAndGet();
}
public long getCachedPreparedStatementMissCount() {
return cachedPreparedStatementMissCount.get();
}
public long getCachedPreparedStatementDeleteCount() {
return cachedPreparedStatementDeleteCount.get();
}