Hendrik
Hendrik

Reputation: 93

How can I get the execution time of a query?

Can't find it in the result->summarize() data... any ideas how to fetch the time directly? It seems like there is something like long resultAvailableAfter( TimeUnit unit ) see there: Cypher query execution time with Neo4j java driver can i access a similar on php?

Upvotes: 2

Views: 313

Answers (1)

Matt King
Matt King

Reputation: 189

A common way to do this in PHP is to get the time() before you execute the query, and then get the time() after you execute the query, and then just find the difference between them. It won't be strictly query execution time since there is some overhead from your connection, etc...but should be very close.

See: http://php.net/manual/en/function.time.php

Upvotes: 1

Related Questions