mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
rename method
This commit is contained in:
@@ -774,7 +774,7 @@ public class StatFilter extends FilterEventAdapter implements StatFilterMBean {
|
||||
long nanos = System.nanoTime() - conn.getConnectedTimeNano();
|
||||
|
||||
long millis = nanos / (1000L * 1000L);
|
||||
dataSourceStat.getConnectionHoldHistogram().recode(millis);
|
||||
dataSourceStat.getConnectionHoldHistogram().record(millis);
|
||||
}
|
||||
|
||||
public DruidPooledConnection dataSource_getConnection(FilterChain chain, DruidDataSource dataSource,
|
||||
|
||||
@@ -723,7 +723,7 @@ public class DruidPooledConnection implements javax.sql.PooledConnection, Connec
|
||||
transactionInfo.setEndTimeMillis();
|
||||
|
||||
long transactionMillis = transactionInfo.getEndTimeMillis() - transactionInfo.getStartTimeMillis();
|
||||
dataSource.getTransactionHistogram().recode(transactionMillis);
|
||||
dataSource.getTransactionHistogram().record(transactionMillis);
|
||||
|
||||
dataSource.logTransaction(transactionInfo);
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ public class JdbcConnectionStat implements JdbcConnectionStatMBean {
|
||||
}
|
||||
|
||||
long aliveMillis = aliveNano / (1000 * 1000);
|
||||
histogram.recode(aliveMillis);
|
||||
histogram.record(aliveMillis);
|
||||
}
|
||||
|
||||
public Throwable getErrorLast() {
|
||||
|
||||
@@ -234,8 +234,8 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
this.updateCount.addAndGet(delta);
|
||||
}
|
||||
|
||||
this.updateCountHistogram.recode(delta);
|
||||
this.fetchRowCountHistogram.recode(0);
|
||||
this.updateCountHistogram.record(delta);
|
||||
this.fetchRowCountHistogram.record(0);
|
||||
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
|
||||
public void addFetchRowCount(long delta) {
|
||||
this.fetchRowCount.addAndGet(delta);
|
||||
this.fetchRowCountHistogram.recode(delta);
|
||||
this.fetchRowCountHistogram.record(delta);
|
||||
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
|
||||
public void addExecuteTime(StatementExecuteType executeType, long nanoSpan) {
|
||||
if (StatementExecuteType.ExecuteQuery != executeType) {
|
||||
executeAndResultHoldTimeHistogram.recode((nanoSpan)/1000/1000);
|
||||
executeAndResultHoldTimeHistogram.record((nanoSpan)/1000/1000);
|
||||
}
|
||||
addExecuteTime(nanoSpan);
|
||||
}
|
||||
@@ -373,7 +373,7 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
}
|
||||
|
||||
long millis = nanoSpan / (1000 * 1000);
|
||||
histogram.recode(millis);
|
||||
histogram.record(millis);
|
||||
}
|
||||
|
||||
public long getExecuteMillisTotal() {
|
||||
@@ -640,7 +640,7 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
public void addResultSetHoldTimeNano(long statementExecuteNano, long resultHoldTimeNano) {
|
||||
resultSetHoldTimeNano.addAndGet(resultHoldTimeNano);
|
||||
executeAndResultSetHoldTime.addAndGet(statementExecuteNano+resultHoldTimeNano);
|
||||
executeAndResultHoldTimeHistogram.recode((statementExecuteNano+resultHoldTimeNano)/1000/1000);
|
||||
updateCountHistogram.recode(0);
|
||||
executeAndResultHoldTimeHistogram.record((statementExecuteNano+resultHoldTimeNano)/1000/1000);
|
||||
updateCountHistogram.record(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class JdbcStatementStat implements JdbcStatementStatMBean {
|
||||
nanoTotal.addAndGet(nanoSpan);
|
||||
|
||||
long millis = nanoSpan / (1000 * 1000);
|
||||
histogram.recode(millis);
|
||||
histogram.record(millis);
|
||||
}
|
||||
|
||||
public void beforeExecute() {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class Histogram {
|
||||
}
|
||||
}
|
||||
|
||||
public void recode(long millis) {
|
||||
public void record(long millis) {
|
||||
int index = rangeCounters.length - 1;
|
||||
for (int i = 0; i < ranges.length; ++i) {
|
||||
if (millis < ranges[i]) {
|
||||
|
||||
Reference in New Issue
Block a user