Load Testing API, gRPC: ReportService.CalculateKpiValues
Returns a list of KPI values for tests matching the specified filter.
gRPC request
rpc CalculateKpiValues (CalculateReportKpiValuesRequest) returns (CalculateReportKpiValuesResponse)
CalculateReportKpiValuesRequest
{
"folderId": "string",
"testFilter": "string",
"testCase": "string",
"kpi": {
"selector": {
// Includes only one of the fields `responseTime`, `instances`, `imbalanceRps`, `protocolCodesAbsolute`, `protocolCodesRelative`, `networkCodesAbsolute`, `networkCodesRelative`
"responseTime": {
"quantile": "QuantileType"
},
"instances": {
"agg": "Aggregation"
},
"imbalanceRps": "ImbalanceRps",
"protocolCodesAbsolute": {
"codesPatterns": [
"string"
]
},
"protocolCodesRelative": {
"codesPatterns": [
"string"
]
},
"networkCodesAbsolute": {
"codesPatterns": [
"string"
]
},
"networkCodesRelative": {
"codesPatterns": [
"string"
]
}
// end of the list of possible fields
},
"threshold": {
"value": "double",
"comparison": "Comparison"
}
}
}
Field |
Description |
folderId |
string Required field. ID of the folder containing tests. |
testFilter |
string Required field. Test filter selector to calculate KPI values for. |
testCase |
string Test case to calculate KPI values for. If not specified, KPI values will be calculated for 'overall' case. |
kpi |
Required field. KPI to be calculated. |
Kpi
KPI (Key Performance Indicator) represents some integral indicator measured during test.
Field |
Description |
selector |
Kind of KPI. |
threshold |
A condition that should be specified. |
KpiSelector
KPI selector.
Field |
Description |
responseTime |
Response time cummulative quantile (percentile). Includes only one of the fields |
instances |
A number of instances throughout the test. Includes only one of the fields |
imbalanceRps |
An RPS at the moment the test has been auto-stopped. Includes only one of the fields |
protocolCodesAbsolute |
A total number of requests completed with certain protocol (HTTP, GRPC, etc.) codes. Includes only one of the fields |
protocolCodesRelative |
A percentage of requests completed with certain protocol (HTTP, GRPC, etc.) codes. Includes only one of the fields |
networkCodesAbsolute |
A total number of requests completed with certain network codes. Includes only one of the fields |
networkCodesRelative |
A percentage of requests completed with certain network codes. Includes only one of the fields |
ResponseTime
Response time.
Field |
Description |
quantile |
enum QuantileType Cummulative quantile (percentile).
|
Instances
Aggregated number of instances.
Field |
Description |
agg |
enum Aggregation Aggregation function.
|
ImbalanceRps
Imbalance RPS.
Field |
Description |
Empty |
ProtocolCodesAbsolute
Field |
Description |
codesPatterns[] |
string Protocol (HTTP, GRPC) code patterns to match. All successful HTTP responses: ['2xx', '3xx']. |
ProtocolCodesRelative
Field |
Description |
codesPatterns[] |
string Protocol (HTTP, GRPC) code patterns to match. All successful HTTP responses: ['2xx', '3xx']. |
NetworkCodesAbsolute
Field |
Description |
codesPatterns[] |
string Network code patterns to match. All successful network responses: ['0']. |
NetworkCodesRelative
Field |
Description |
codesPatterns[] |
string Network code patterns to match. All successful network responses: ['0']. |
KpiThreshold
KPI threshold represents a condition that an actual value of test's KPI should satisfy.
Field |
Description |
value |
double Value for comparison with an actual KPI value. |
comparison |
enum Comparison Comparison operator for comparing actual with the threshold value. Rule: actual (</<=/>/>=) reference
|
CalculateReportKpiValuesResponse
{
"folderId": "string",
"values": [
{
"testId": "string",
"value": "double",
"isOk": "bool"
}
]
}
Field |
Description |
folderId |
string ID of the folder. |
values[] |
Actual KPI values. |
KpiValue
An actual value of test's KPI.
Field |
Description |
testId |
string ID of a test. |
value |
double Value of KPI. |
isOk |
bool A flag indicating whether the value satisfies KPI threshold condition. |