}
// benchmark the evaluate with a document as context
try {
time = System.nanoTime();
FormulaContext ctx1 = Formulas.createContext(ntfDoc, Formulas.getParser());
ntfDocResult = ast.solve(ctx1);
docEvaluateTime += System.nanoTime() - time;
} catch (Exception e) {
System.out.println(NTF("Doc-Evaluate failed: ") + ERROR(e));
e.printStackTrace();
i = count;
}
try {
// benchmark the evaluate with a map as context
time = System.nanoTime();
FormulaContext ctx2 = Formulas.createContext(ntfMap, Formulas.getParser());
ntfMapResult = ast.solve(ctx2);
mapEvaluateTime += System.nanoTime() - time;
} catch (Exception e) {
System.out.println(NTF("Map-Evaluate failed: ") + ERROR(e));
e.printStackTrace();