Created
February 16, 2016 04:18
-
-
Save maxdemarzi/643a89a78dbd0d6c237b to your computer and use it in GitHub Desktop.
test run bolt via grooby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab("org.neo4j.driver:neo4j-java-driver:1.0-SNAPSHOT") | |
import org.neo4j.driver.v1.* | |
Driver driver = GraphDatabase.driver( "bolt://localhost" ); | |
Session session = driver.session(); | |
//Result rs = session.run("cypher runtime=compiled MATCH (n:Foo)-[r:NEXT]->(m) RETURN n.id AS n,m.id AS m"); | |
ResultCursor rs = session.run(" MATCH (n) WHERE ID(n) = 0 RETURN id(n) AS n"); | |
count = 0 | |
d = System.nanoTime() | |
for (i = 0; i < 6500; i++) { | |
rs = session.run(" MATCH (n) WHERE ID(n) = 0 RETURN id(n) AS n"); | |
rs.first().get("n").asLong(); | |
count ++; | |
} | |
System.err.println((System.nanoTime()-d) /1000000+" ms count "+count) | |
session.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment