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.782773494720459,
"peakMemoryUsage" : 2312,
"nodes" : [
{
"id" : 1,
"calls" : 1,
"items" : 1,
"runtime" : 9.5367431640625e-7
},
{
"id" : 2,
"calls" : 1,
"items" : 1,
"runtime" : 0.27089834213256836
},
{
"id" : 3,
"calls" : 1,
"items" : 1,
"runtime" : 0.7825789451599121
},
{
"id" : 4,
"calls" : 1,
"items" : 1,
"runtime" : 0.0000026226043701171875
},
{
"id" : 5,
"calls" : 1,
"items" : 1,
"runtime" : 0.7825822830200195
}
]
},
"warnings" : [ ],
"profile" : {
"initializing" : 9.5367431640625e-7,
"parsing" : 0.000023365020751953125,
"optimizing ast" : 0.00000286102294921875,
"loading collections" : 0.0000019073486328125,
"instantiating plan" : 0.000023603439331054688,
"optimizing plan" : 0.00004363059997558594,
"executing" : 0.7825920581817627,
"finalizing" : 0.00008034706115722656
}
},
"error" : false,
"code" : 201
}