mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add stat readStringLength
This commit is contained in:
@@ -77,6 +77,7 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
|
||||
private final AtomicLong clobOpenCount = new AtomicLong();
|
||||
private final AtomicLong blobOpenCount = new AtomicLong();
|
||||
private final AtomicLong stringReadLength = new AtomicLong();
|
||||
|
||||
private final Histogram histogram = new Histogram(new long[] { //
|
||||
//
|
||||
@@ -226,6 +227,7 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
|
||||
blobOpenCount.set(0);
|
||||
clobOpenCount.set(0);
|
||||
stringReadLength.set(0);
|
||||
}
|
||||
|
||||
public long getConcurrentMax() {
|
||||
@@ -274,14 +276,22 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
public void incrementClobOpenCount() {
|
||||
clobOpenCount.incrementAndGet();
|
||||
}
|
||||
|
||||
|
||||
public long getBlobOpenCount() {
|
||||
return blobOpenCount.get();
|
||||
}
|
||||
|
||||
|
||||
public void incrementBlobOpenCount() {
|
||||
blobOpenCount.incrementAndGet();
|
||||
}
|
||||
|
||||
public long getStringReadLength() {
|
||||
return stringReadLength.get();
|
||||
}
|
||||
|
||||
public void addStringReadLength(long length) {
|
||||
this.stringReadLength.addAndGet(length);
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
@@ -505,9 +515,10 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
SimpleType.LONG, //
|
||||
SimpleType.LONG, //
|
||||
SimpleType.LONG, //
|
||||
|
||||
|
||||
// 35 -
|
||||
SimpleType.LONG, //
|
||||
SimpleType.LONG, //
|
||||
|
||||
};
|
||||
|
||||
@@ -560,9 +571,10 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
"EffectedRowCountMax", //
|
||||
"FetchRowCountMax", //
|
||||
"ClobOpenCount",
|
||||
|
||||
|
||||
// 35 -
|
||||
"BlobOpenCount",
|
||||
"StringReadLength",
|
||||
|
||||
//
|
||||
};
|
||||
@@ -634,8 +646,9 @@ public final class JdbcSqlStat implements JdbcSqlStatMBean {
|
||||
map.put("EffectedRowCountMax", getUpdateCountMax()); // 32
|
||||
map.put("FetchRowCountMax", getFetchRowCountMax()); // 33
|
||||
map.put("ClobOpenCount", getClobOpenCount()); // 34
|
||||
|
||||
|
||||
map.put("BlobOpenCount", getBlobOpenCount()); // 35
|
||||
map.put("StringReadLength", getStringReadLength()); // 36
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user