I am trying to find out execution time of my Cypher query with java driver.
Session session = driver.session();
session.run( "CREATE (a:Person {name:'Arthur', title:'King'})" );
StatementResult result = session.run( "Profile MATCH (a:Person) WHERE a.name = 'Arthur' RETURN a.name AS name, a.title AS title" );
But I could not find it anywhere in the StatementResult or in the ResultSummary, which is returned by StatementResult.consume(query)
.
I could access db hits from ProfiledPlan
in ResultSummary
but there is no information about time.
Is there any way I can access Cypher query execution time using neo4j java driver?
Since Neo4j Java driver version 1.1.0 there is:
It provides you with both times:
Methods are localted on
org.neo4j.driver.v1.summary.ResultSummary
interface.