mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
添加ReusePreparedStatement计数
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@913 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -178,6 +178,7 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
protected final AtomicLong commitCount = new AtomicLong();
|
||||
protected final AtomicLong startTransactionCount = new AtomicLong();
|
||||
protected final AtomicLong rollbackCount = new AtomicLong();
|
||||
protected final AtomicLong reusePreparedStatement = new AtomicLong();
|
||||
|
||||
protected final Histogram transactionHistogram = new Histogram(
|
||||
10,
|
||||
@@ -189,6 +190,14 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
public Histogram getTransactionHistogram() {
|
||||
return transactionHistogram;
|
||||
}
|
||||
|
||||
public void incrementPreparedStatementCount() {
|
||||
reusePreparedStatement.incrementAndGet();
|
||||
}
|
||||
|
||||
public long getReusePreparedStatement() {
|
||||
return reusePreparedStatement.get();
|
||||
}
|
||||
|
||||
public long getTransactionThresholdMillis() {
|
||||
return transactionThresholdMillis;
|
||||
@@ -203,7 +212,7 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
public long[] getTransactionHistogramValues() {
|
||||
return transactionHistogram.toArray();
|
||||
}
|
||||
|
||||
|
||||
public long[] getTransactionHistogramRanges() {
|
||||
return transactionHistogram.getRanges();
|
||||
}
|
||||
@@ -569,10 +578,6 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
}
|
||||
|
||||
public void setPoolPreparedStatements(boolean poolPreparedStatements) {
|
||||
if (inited) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
this.poolPreparedStatements = poolPreparedStatements;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user