The old cypher endpoint (i.e /db/data/cypher) had a ?profile=true query parameter that adds profiling information to the result.
e.g.
curl -H accept:application/json -H content-type:application/json
-d'{"query":"MATCH (n) RETURN count(*)","params":{}}'
http://localhost:7474/d/data/cypher?profile=true
{
"columns" : [ "count(*)" ],
"data" : [ [ 0 ] ],
"plan" : {
"args" : {
"returnItemNames" : [ "count(*)" ],
"_rows" : 1,
"_db_hits" : 0,
"symKeys" : [ " INTERNAL_AGGREGATE75acebd9-82d7-4a65-921c-2049c4bde4e7" ]
},
"dbHits" : 0,
"name" : "ColumnFilter",
"children" : [ {
"args" : {
"keys" : [ ],
"_rows" : 1,
"aggregates" : [ "( INTERNAL_AGGREGATE75acebd9-82d7-4a65-921c-2049c4bde4e7,CountStar())" ],
"_db_hits" : 0
},
"dbHits" : 0,
"name" : "EagerAggregation",
"children" : [ {
"args" : {
"_rows" : 0,
"_db_hits" : 0,
"identifier" : "n"
},
"dbHits" : 0,
"name" : "AllNodes",
"children" : [ ],
"rows" : 0
} ],
"rows" : 1
} ],
"rows" : 1
}
}