Skip to content

Commit b8ec7fa

Browse files
rakhi-prathapsimon-dew
authored andcommitted
[DOC-13257] Add new request fields to Query Service and Query Admin APIs (#168)
1 parent 320264a commit b8ec7fa

4 files changed

Lines changed: 290 additions & 3 deletions

File tree

docs/modules/n1ql-rest-admin/pages/index.adoc

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5606,6 +5606,25 @@ Refer to the [request-level][client_context_id] `client_context_id` parameter fo
56065606
a| String
56075607

56085608

5609+
a|
5610+
*cpuTime* +
5611+
_optional_
5612+
a|
5613+
5614+
[markdown]
5615+
--
5616+
The total sum of [execTime][exec_time] across all operators.
5617+
5618+
[exec_time]: ../n1ql-rest-query/index.html#exec_time
5619+
5620+
--
5621+
5622+
[%hardbreaks]
5623+
*Example:* `pass:c["90.734075ms"]`
5624+
{blank}
5625+
a| String (duration)
5626+
5627+
56095628
a|
56105629
*elapsedTime* +
56115630
_optional_
@@ -5638,6 +5657,25 @@ Total number of errors encountered while executing the query.
56385657
a| Integer
56395658

56405659

5660+
a|
5661+
*ioTime* +
5662+
_optional_
5663+
a|
5664+
5665+
[markdown]
5666+
--
5667+
The total sum of [servTime][serv_time] across all operators.
5668+
5669+
[serv_time]: ../n1ql-rest-query/index.html#serv_time
5670+
5671+
--
5672+
5673+
[%hardbreaks]
5674+
*Example:* `pass:c["752.858519ms"]`
5675+
{blank}
5676+
a| String (duration)
5677+
5678+
56415679
a|
56425680
*memoryQuota* +
56435681
_optional_
@@ -5836,6 +5874,28 @@ Total amount of calendar time taken to complete the query.
58365874
a| String (duration)
58375875

58385876

5877+
a|
5878+
*sessionMemory* +
5879+
_optional_
5880+
a|
5881+
5882+
[markdown]
5883+
--
5884+
The memory session size for the request, in bytes.
5885+
5886+
Each request has a dedicated memory session.
5887+
When a query requires a document or value, memory is allocated from this session based on the size of the document or value.
5888+
Once the document or value is processed, the allocated memory is returned back to the session, enabling it to be reused by the request.
5889+
5890+
This metric is available only when `node-quota` and `node-quota-val-percent` are configured for the node.
5891+
5892+
--
5893+
5894+
[%hardbreaks]
5895+
{blank}
5896+
a| Integer (bytes)
5897+
5898+
58395899
a|
58405900
*state* +
58415901
_optional_
@@ -5934,6 +5994,43 @@ Username with whose privileges the query is run.
59345994
a| String
59355995

59365996

5997+
a|
5998+
*waitTime* +
5999+
_optional_
6000+
a|
6001+
6002+
[markdown]
6003+
--
6004+
The total sum of [kernTime][kern_time] across all operators.
6005+
6006+
[kern_time]: ../n1ql-rest-query/index.html#kern_time
6007+
6008+
--
6009+
6010+
[%hardbreaks]
6011+
*Example:* `pass:c["1.201307s"]`
6012+
{blank}
6013+
a| String (duration)
6014+
6015+
6016+
a|
6017+
*~analysis* +
6018+
_optional_
6019+
a|
6020+
6021+
[markdown]
6022+
--
6023+
An array of text phrases that provide a basic analysis of the request execution.
6024+
These phrases highlight notable aspects of the execution, such as high document counts during primary scans or warnings related to memory and resource usages.
6025+
6026+
--
6027+
6028+
[%hardbreaks]
6029+
*Example:* `["High IO time","High primary scan document count"]`
6030+
{blank}
6031+
a| String
6032+
array
6033+
59376034
|===
59386035

59396036
//end::Requests[]

docs/modules/n1ql-rest-query/pages/index.adoc

Lines changed: 92 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,26 @@ The number of warnings that occurred during the request.
11911191
a| Integer (unsigned)
11921192

11931193

1194+
a|
1195+
*sessionMemory* +
1196+
_optional_
1197+
a|
1198+
1199+
[markdown]
1200+
--
1201+
The memory session size for the request, in bytes.
1202+
1203+
Each request has a dedicated memory session. When a query requires a document or value, memory is allocated from this session based on the size of the document or value. Once the document or value is processed, the allocated memory is returned back to the session, enabling it to be reused by the request.
1204+
1205+
This metric is available only when `node-quota` and `node-quota-val-percent` are configured for the node.
1206+
1207+
--
1208+
1209+
[%hardbreaks]
1210+
{blank}
1211+
a| Integer (bytes)
1212+
1213+
11941214
|===
11951215

11961216
//end::Metrics[]
@@ -1340,6 +1360,75 @@ include::index.adoc[tag=desc-Execution_Timings, opts=optional]
13401360
a| <<Execution_Timings>>
13411361

13421362

1363+
a|
1364+
*ioTime* +
1365+
_optional_
1366+
a|
1367+
1368+
[markdown]
1369+
--
1370+
The total sum of [servTime](#serv_time) across all operators.
1371+
1372+
--
1373+
1374+
[%hardbreaks]
1375+
*Example:* `pass:c["752.858519ms"]`
1376+
{blank}
1377+
a| String (duration)
1378+
1379+
1380+
a|
1381+
*waitTime* +
1382+
_optional_
1383+
a|
1384+
1385+
[markdown]
1386+
--
1387+
The total sum of [kernTime](#kern_time) across all operators.
1388+
1389+
--
1390+
1391+
[%hardbreaks]
1392+
*Example:* `pass:c["1.201307s"]`
1393+
{blank}
1394+
a| String (duration)
1395+
1396+
1397+
a|
1398+
*cpuTime* +
1399+
_optional_
1400+
a|
1401+
1402+
[markdown]
1403+
--
1404+
The total sum of [execTime](#exec_time) across all operators.
1405+
1406+
--
1407+
1408+
[%hardbreaks]
1409+
*Example:* `pass:c["90.734075ms"]`
1410+
{blank}
1411+
a| String (duration)
1412+
1413+
1414+
a|
1415+
*~analysis* +
1416+
_optional_
1417+
a|
1418+
1419+
[markdown]
1420+
--
1421+
An array of text phrases that provide a basic analysis of the request execution.
1422+
These phrases highlight notable aspects of the execution, such as high document counts during primary scans or warnings related to memory and resource usages.
1423+
1424+
--
1425+
1426+
[%hardbreaks]
1427+
*Example:* `["High IO time","High primary scan document count"]`
1428+
{blank}
1429+
a| String
1430+
array
1431+
13431432
|===
13441433

13451434
//end::Profile[]
@@ -2788,7 +2877,7 @@ Number of switches between executing, waiting for services, or waiting for the g
27882877
a| Integer (int32)
27892878

27902879

2791-
a|
2880+
a| [#exec_time]
27922881
*execTime* +
27932882
_optional_
27942883
a|
@@ -2804,7 +2893,7 @@ Time spent executing the operator code inside SQL++ query engine.
28042893
a| String (duration)
28052894

28062895

2807-
a|
2896+
a| [#kern_time]
28082897
*kernTime* +
28092898
_optional_
28102899
a|
@@ -2820,7 +2909,7 @@ Time spent waiting to be scheduled for CPU time.
28202909
a| String (duration)
28212910

28222911

2823-
a|
2912+
a| [#serv_time]
28242913
*servTime* +
28252914
_optional_
28262915
a|

src/admin/swagger/admin.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,15 @@ components:
660660
[client_context_id]: ../n1ql-rest-query/index.html#client_context_id
661661
x-desc-refs: |
662662
[client_context_id]: #client_context_id
663+
cpuTime:
664+
type: string
665+
format: duration
666+
description: |
667+
The total sum of [execTime][exec_time] across all operators.
668+
669+
[exec_time]: ../n1ql-rest-query/index.html#exec_time
670+
x-has-example: true
671+
example: "90.734075ms"
663672
elapsedTime:
664673
type: string
665674
format: duration
@@ -669,6 +678,15 @@ components:
669678
errorCount:
670679
type: integer
671680
description: Total number of errors encountered while executing the query.
681+
ioTime:
682+
type: string
683+
format: duration
684+
description: |
685+
The total sum of [servTime][serv_time] across all operators.
686+
687+
[serv_time]: ../n1ql-rest-query/index.html#serv_time
688+
x-has-example: true
689+
example: "752.858519ms"
672690
memoryQuota:
673691
type: integer
674692
description: |
@@ -747,6 +765,17 @@ components:
747765
type: string
748766
format: duration
749767
description: Total amount of calendar time taken to complete the query.
768+
sessionMemory:
769+
type: integer
770+
format: bytes
771+
description: |
772+
The memory session size for the request, in bytes.
773+
774+
Each request has a dedicated memory session.
775+
When a query requires a document or value, memory is allocated from this session based on the size of the document or value.
776+
Once the document or value is processed, the allocated memory is returned back to the session, enabling it to be reused by the request.
777+
778+
This metric is available only when `node-quota` and `node-quota-val-percent` are configured for the node.
750779
state:
751780
type: string
752781
description: |
@@ -773,6 +802,28 @@ components:
773802
users:
774803
type: string
775804
description: Username with whose privileges the query is run.
805+
waitTime:
806+
type: string
807+
format: duration
808+
description: |
809+
The total sum of [kernTime][kern_time] across all operators.
810+
811+
[kern_time]: ../n1ql-rest-query/index.html#kern_time
812+
x-has-example: true
813+
example: "1.201307s"
814+
~analysis:
815+
type: array
816+
items:
817+
type: string
818+
description: |
819+
An array of text phrases that provide a basic analysis of the request execution.
820+
These phrases highlight notable aspects of the execution, such as high document counts during primary scans or warnings related to memory and resource usages.
821+
x-has-example: true
822+
example:
823+
[
824+
"High IO time",
825+
"High primary scan document count"
826+
]
776827

777828
Statements:
778829
type: object

0 commit comments

Comments
 (0)