}
@Test
public void testExecutionEngine() throws Exception {
GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase();
ExecutionEngine engine = new ExecutionEngine(db);
long time = System.currentTimeMillis();
Map<String, Object> params = map("i", null);
Map.Entry<String, Object> entry = params.entrySet().iterator().next();
for (int i=1;i<1_000_000;i++) {
entry.setValue(i);
engine.execute("return {i}",params);
if (i % 50_000 == 0) {
System.out.println("commit " + i + " " + (System.currentTimeMillis() - time) + " ms since start");
}
}
time = System.currentTimeMillis() - time;