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
{
"folder_id": "string",
"test_filter": "string",
"test_case": "string",
"kpi": {
"selector": {
// Includes only one of the fields `response_time`, `instances`, `imbalance_rps`, `protocol_codes_absolute`, `protocol_codes_relative`, `network_codes_absolute`, `network_codes_relative`
"response_time": {
"quantile": "QuantileType"
},
"instances": {
"agg": "Aggregation"
},
"imbalance_rps": "ImbalanceRps",
"protocol_codes_absolute": {
"codes_patterns": [
"string"
]
},
"protocol_codes_relative": {
"codes_patterns": [
"string"
]
},
"network_codes_absolute": {
"codes_patterns": [
"string"
]
},
"network_codes_relative": {
"codes_patterns": [
"string"
]
}
// end of the list of possible fields
},
"threshold": {
"value": "double",
"comparison": "Comparison"
}
}
}
Field |
Description |
folder_id |
string Required field. ID of the folder containing tests. |
test_filter |
string Required field. Test filter selector to calculate KPI values for. |
test_case |
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 |
response_time |
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 |
imbalance_rps |
An RPS at the moment the test has been auto-stopped. Includes only one of the fields |
protocol_codes_absolute |
A total number of requests completed with certain protocol (HTTP, GRPC, etc.) codes. Includes only one of the fields |
protocol_codes_relative |
A percentage of requests completed with certain protocol (HTTP, GRPC, etc.) codes. Includes only one of the fields |
network_codes_absolute |
A total number of requests completed with certain network codes. Includes only one of the fields |
network_codes_relative |
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 |
codes_patterns[] |
string Protocol (HTTP, GRPC) code patterns to match. All successful HTTP responses: ['2xx', '3xx']. |
ProtocolCodesRelative
Field |
Description |
codes_patterns[] |
string Protocol (HTTP, GRPC) code patterns to match. All successful HTTP responses: ['2xx', '3xx']. |
NetworkCodesAbsolute
Field |
Description |
codes_patterns[] |
string Network code patterns to match. All successful network responses: ['0']. |
NetworkCodesRelative
Field |
Description |
codes_patterns[] |
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
{
"folder_id": "string",
"values": [
{
"test_id": "string",
"value": "double",
"is_ok": "bool"
}
]
}
Field |
Description |
folder_id |
string ID of the folder. |
values[] |
Actual KPI values. |
KpiValue
An actual value of test's KPI.
Field |
Description |
test_id |
string ID of a test. |
value |
double Value of KPI. |
is_ok |
bool A flag indicating whether the value satisfies KPI threshold condition. |