Skip to content
Permalink
Browse files
Merge pull request #606 from blackfor/trunk
OAK-9816: add max rows read data to table
  • Loading branch information
thomasmueller committed Jun 28, 2022
2 parents 23df422 + f609f13 commit 65616a51864df280189335667804145f327f3160
Showing 2 changed files with 11 additions and 7 deletions.
@@ -66,6 +66,10 @@ public long getTotalTimeNanos() {
return planNanos + readNanos;
}

public long getMaxRowsRead() {
return maxRowsRead;
}

public long getMaxRowsScanned() {
return maxRowsScanned;
}
@@ -208,18 +208,18 @@ private static class QueryStatsCompositeTypeFactory {

private final static String[] names = { "position",
"maxTimeMillis", "totalTimeMillis", "executeCount",
"rowsRead", "rowsScanned", "maxRowsScanned",
"rowsRead", "rowsScanned", "maxRowsRead", "maxRowsScanned",
"language", "statement", "lastExecuted",
"lastThread"};

private final static String[] descriptions = names;

@SuppressWarnings("rawtypes")
private final static OpenType[] types = { SimpleType.LONG,
SimpleType.LONG, SimpleType.LONG, SimpleType.LONG,
SimpleType.LONG, SimpleType.LONG, SimpleType.LONG,
SimpleType.STRING, SimpleType.STRING, SimpleType.STRING,
SimpleType.STRING};
private final static OpenType[] types = {SimpleType.LONG,
SimpleType.LONG, SimpleType.LONG, SimpleType.LONG,
SimpleType.LONG, SimpleType.LONG, SimpleType.LONG, SimpleType.LONG,
SimpleType.STRING, SimpleType.STRING, SimpleType.STRING,
SimpleType.STRING};

public static CompositeType getCompositeType() throws OpenDataException {
return new CompositeType(QueryStatsMBean.class.getName(),
@@ -229,7 +229,7 @@ public static CompositeType getCompositeType() throws OpenDataException {
public static Object[] getValues(QueryStatsData q, int position) {
return new Object[] { (long) position,
q.getMaxTimeNanos() / 1000000, q.getTotalTimeNanos() / 1000000, q.getExecuteCount(),
q.getTotalRowsRead(), q.getTotalRowsScanned(), q.getMaxRowsScanned(),
q.getTotalRowsRead(), q.getTotalRowsScanned(), q.getMaxRowsRead(), q.getMaxRowsScanned(),
q.getLanguage(), q.getQuery(), QueryStatsData.getTimeString(q.getLastExecutedMillis()),
q.isInternal() ? "(internal query)" : q.getLastThreadName()};
}

0 comments on commit 65616a5

Please sign in to comment.