logicalOptimizationTime += logicalOptimizationTimeArray[i];
physicalOptimizationTimeArray[i] = evaluator.physicalOptimization();
physicalOptimizationTime += physicalOptimizationTimeArray[i];
if(evaluator instanceof CommonCoreQueryEvaluator){
// walk one time through whole result...
((CommonCoreQueryEvaluator<Node>)evaluator).getResultOperator().addApplication(new IterateOneTimeThrough());
}
evaluateQueryTimeArray[i] = evaluator.evaluateQuery();
evaluateQueryTime += evaluateQueryTimeArray[i];
totalTimeArray[i] = compileQueryTimeArray[i]
+ logicalOptimizationTimeArray[i]
+ physicalOptimizationTimeArray[i]
+ evaluateQueryTimeArray[i];
totalTime += totalTimeArray[i];
if (!(evaluator instanceof MemoryIndexQueryEvaluator))
DiskCollection.removeCollectionsFromDisk();
}
if (!((totalTime * 0.95) / times <= totalTimeArray[0] && totalTimeArray[0] <= (totalTime * 1.05)
/ times)) {
System.out
.println("The total time of the first experiment differs more than 5% from the average. We run this experiment again.\nThe old times are:"
+ compileQueryTimeArray[0]
+ " (comp.) + "
+ logicalOptimizationTimeArray[0]
+ " (log. opt.) + "
+ physicalOptimizationTimeArray[0]
+ " (phys. opt.) + "
+ evaluateQueryTimeArray[0]
+ " (eval.) = "
+ totalTimeArray[0]
+ "\n");
compileQueryTime -= compileQueryTimeArray[0];
logicalOptimizationTime -= logicalOptimizationTimeArray[0];
physicalOptimizationTime -= physicalOptimizationTimeArray[0];
evaluateQueryTime -= evaluateQueryTimeArray[0];
totalTime -= totalTimeArray[0];
compileQueryTimeArray[0] = evaluator.compileQuery(query);
compileQueryTime += compileQueryTimeArray[0];
logicalOptimizationTimeArray[0] = evaluator.logicalOptimization();
logicalOptimizationTime += logicalOptimizationTimeArray[0];
physicalOptimizationTimeArray[0] = evaluator.physicalOptimization();
physicalOptimizationTime += physicalOptimizationTimeArray[0];
if(evaluator instanceof CommonCoreQueryEvaluator){
// walk one time through whole result...
((CommonCoreQueryEvaluator<Node>)evaluator).getResultOperator().addApplication(new IterateOneTimeThrough());
}
evaluateQueryTimeArray[0] = evaluator.evaluateQuery();
evaluateQueryTime += evaluateQueryTimeArray[0];
totalTimeArray[0] = compileQueryTimeArray[0]
+ logicalOptimizationTimeArray[0]