Add MetaInfoManager API, remove MetaQueryStatistic entity bean, refactor query execution stats collection

This commit is contained in:
Rob Bygrave committed 2014-01-19 22:49:18 +13:00
1 parent 05dcdf162b
commit 6bd8c2bd05
40 files changed
+1375 -1093

No files matched your search

@@ -224,7 +224,7 @@ public interface AutoFetchManager extends NodeUsageListener {
* @param micros
* the query executing time in microseconds
*/
public void collectQueryInfo(ObjectGraphNode node, int beans, int micros);
public void collectQueryInfo(ObjectGraphNode node, long beans, long micros);
/**
@@ -61,6 +61,7 @@ public class AutoFetchManagerFactory {
FileInputStream fi = new FileInputStream(autoFetchFile);
ObjectInputStream ois = new ObjectInputStream(fi);
AutoFetchManager profListener = (AutoFetchManager) ois.readObject();
ois.close();
logger.info("AutoFetch deserialized from file ["+autoFetchFile.getAbsolutePath()+"]");
@@ -527,7 +527,7 @@ public class DefaultAutoFetchManager implements AutoFetchManager, Serializable {
* query in which case the parentNode will be null, or a lazy loading query
* resulting from traversal of the object graph.
*/
public void collectQueryInfo(ObjectGraphNode node, int beans, int micros) {
public void collectQueryInfo(ObjectGraphNode node, long beans, long micros) {
if (node != null){
ObjectGraphOrigin origin = node.getOriginQueryPoint();
@@ -127,7 +127,7 @@ public class Statistics implements Serializable {
}
public void collectQueryInfo(ObjectGraphNode node, int beansLoaded, int micros) {
public void collectQueryInfo(ObjectGraphNode node, long beansLoaded, long micros) {
synchronized (monitor) {
String key = node.getPath();
@@ -13,11 +13,11 @@ public class StatisticsQuery implements Serializable {
private final String path;
private int exeCount;
private long exeCount;
private int totalBeanLoaded;
private long totalBeanLoaded;
private int totalMicros;
private long totalMicros;
public StatisticsQuery(String path){
this.path = path;
@@ -27,7 +27,7 @@ public class StatisticsQuery implements Serializable {
return new QueryStats(path, exeCount, totalBeanLoaded, totalMicros);
}
public void add(int beansLoaded, int micros) {
public void add(long beansLoaded, long micros) {
exeCount++;
totalBeanLoaded += beansLoaded;
totalMicros += micros;