shell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/cursor <<EOF
{
"query" : "LET s = SLEEP(0.25) LET t = SLEEP(0.5) RETURN 1",
"count" : true,
"options" : {
"profile" : 2
}
}
EOF
HTTP/1.1 Created
content-type: application/json; charset=utf-8
x-content-type-options: nosniff
{
"result" : [
1
],
"hasMore" : false,
"count" : 1,
"cached" : false,
"extra" : {
"plan" : {
"nodes" : [
{
"type" : "SingletonNode",
"dependencies" : [ ],
"id" : 1,
"estimatedCost" : 1,
"estimatedNrItems" : 1
},
{
"type" : "CalculationNode",
"dependencies" : [
1
],
"id" : 4,
"estimatedCost" : 2,
"estimatedNrItems" : 1,
"expression" : {
"type" : "value",
"typeID" : 40,
"value" : 1,
"vType" : "int",
"vTypeID" : 2
},
"outVariable" : {
"id" : 3,
"name" : "2"
},
"canThrow" : false,
"expressionType" : "json"
},
{
"type" : "CalculationNode",
"dependencies" : [
4
],
"id" : 2,
"estimatedCost" : 3,
"estimatedNrItems" : 1,
"expression" : {
"type" : "function call",
"typeID" : 47,
"name" : "SLEEP",
"subNodes" : [
{
"type" : "array",
"typeID" : 41,
"subNodes" : [
{
"type" : "value",
"typeID" : 40,
"value" : 0.25,
"vType" : "double",
"vTypeID" : 3
}
]
}
]
},
"outVariable" : {
"id" : 0,
"name" : "s"
},
"canThrow" : false,
"expressionType" : "simple"
},
{
"type" : "CalculationNode",
"dependencies" : [
2
],
"id" : 3,
"estimatedCost" : 4,
"estimatedNrItems" : 1,
"expression" : {
"type" : "function call",
"typeID" : 47,
"name" : "SLEEP",
"subNodes" : [
{
"type" : "array",
"typeID" : 41,
"subNodes" : [
{
"type" : "value",
"typeID" : 40,
"value" : 0.5,
"vType" : "double",
"vTypeID" : 3
}
]
}
]
},
"outVariable" : {
"id" : 1,
"name" : "t"
},
"canThrow" : false,
"expressionType" : "simple"
},
{
"type" : "ReturnNode",
"dependencies" : [
3
],
"id" : 5,
"estimatedCost" : 5,
"estimatedNrItems" : 1,
"inVariable" : {
"id" : 3,
"name" : "2"
},
"count" : true
}
],
"rules" : [
"move-calculations-up"
],
"collections" : [ ],
"variables" : [
{
"id" : 3,
"name" : "2"
},
{
"id" : 1,
"name" : "t"
},
{
"id" : 0,
"name" : "s"
}
],
"estimatedCost" : 5,
"estimatedNrItems" : 1,
"initialize" : true,
"isModificationQuery" : false
},
"stats" : {
"writesExecuted" : 0,
"writesIgnored" : 0,
"scannedFull" : 0,
"scannedIndex" : 0,
"filtered" : 0,
"httpRequests" : 0,
"executionTime" : 0.7825753688812256,
"peakMemoryUsage" : 2312,
"nodes" : [
{
"id" : 1,
"calls" : 1,
"items" : 1,
"runtime" : 0.0000016689300537109375
},
{
"id" : 2,
"calls" : 1,
"items" : 1,
"runtime" : 0.2707178592681885
},
{
"id" : 3,
"calls" : 1,
"items" : 1,
"runtime" : 0.7823958396911621
},
{
"id" : 4,
"calls" : 1,
"items" : 1,
"runtime" : 0.0000050067901611328125
},
{
"id" : 5,
"calls" : 1,
"items" : 1,
"runtime" : 0.7823982238769531
}
]
},
"warnings" : [ ],
"profile" : {
"initializing" : 0.0000016689300537109375,
"parsing" : 0.0000209808349609375,
"optimizing ast" : 0.000003337860107421875,
"loading collections" : 0.0000035762786865234375,
"instantiating plan" : 0.00000762939453125,
"optimizing plan" : 0.00003504753112792969,
"executing" : 0.7824089527130127,
"finalizing" : 0.00008845329284667969
}
},
"error" : false,
"code" : 201
}