1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
/// KPI (Key Performance Indicator) represents some integral indicator measured during test.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Kpi {
/// Kind of KPI.
#[prost(message, optional, tag = "1")]
pub selector: ::core::option::Option<KpiSelector>,
/// A condition that should be specified.
#[prost(message, optional, tag = "2")]
pub threshold: ::core::option::Option<KpiThreshold>,
}
/// KPI threshold represents a condition that an actual value of test's KPI should satisfy.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KpiThreshold {
/// Value for comparison with an actual KPI value.
#[prost(double, tag = "1")]
pub value: f64,
/// Comparison operator for comparing actual with the threshold value.
///
/// Rule: actual (</<=/>/>=) reference
#[prost(enumeration = "Comparison", tag = "2")]
pub comparison: i32,
}
/// KPI selector.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KpiSelector {
#[prost(oneof = "kpi_selector::Kind", tags = "1, 2, 3, 4, 5, 6, 7")]
pub kind: ::core::option::Option<kpi_selector::Kind>,
}
/// Nested message and enum types in `KpiSelector`.
pub mod kpi_selector {
/// Response time.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResponseTime {
/// Cummulative quantile (percentile).
#[prost(enumeration = "super::super::common::QuantileType", tag = "1")]
pub quantile: i32,
}
/// Aggregated number of instances.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Instances {
/// Aggregation function.
#[prost(enumeration = "super::Aggregation", tag = "1")]
pub agg: i32,
}
/// Imbalance RPS.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImbalanceRps {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtocolCodesAbsolute {
/// Protocol (HTTP, GRPC) code patterns to match.
///
/// All successful HTTP responses: ['2xx', '3xx'].
/// All failed HTTP responses: ['0', '4xx', '5xx'].
#[prost(string, repeated, tag = "1")]
pub codes_patterns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtocolCodesRelative {
/// Protocol (HTTP, GRPC) code patterns to match.
///
/// All successful HTTP responses: ['2xx', '3xx'].
/// All failed HTTP responses: ['0', '4xx', '5xx'].
#[prost(string, repeated, tag = "1")]
pub codes_patterns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkCodesAbsolute {
/// Network code patterns to match.
///
/// All successful network responses: \['0'\].
/// All failed network responses: ['xx', 'xxx'].
#[prost(string, repeated, tag = "1")]
pub codes_patterns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkCodesRelative {
/// Network code patterns to match.
///
/// All successful network responses: \['0'\].
/// All failed network responses: ['xx', 'xxx'].
#[prost(string, repeated, tag = "1")]
pub codes_patterns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
/// Response time cummulative quantile (percentile).
#[prost(message, tag = "1")]
ResponseTime(ResponseTime),
/// A number of instances throughout the test.
#[prost(message, tag = "2")]
Instances(Instances),
/// An RPS at the moment the test has been auto-stopped.
#[prost(message, tag = "3")]
ImbalanceRps(ImbalanceRps),
/// A total number of requests completed with certain protocol (HTTP, GRPC, etc.) codes.
#[prost(message, tag = "4")]
ProtocolCodesAbsolute(ProtocolCodesAbsolute),
/// A percentage of requests completed with certain protocol (HTTP, GRPC, etc.) codes.
#[prost(message, tag = "5")]
ProtocolCodesRelative(ProtocolCodesRelative),
/// A total number of requests completed with certain network codes.
#[prost(message, tag = "6")]
NetworkCodesAbsolute(NetworkCodesAbsolute),
/// A percentage of requests completed with certain network codes.
#[prost(message, tag = "7")]
NetworkCodesRelative(NetworkCodesRelative),
}
}
/// Aggregation function.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Aggregation {
/// Unspecified.
Unspecified = 0,
/// Minimum.
Min = 1,
/// Maximum.
Max = 2,
/// Average.
Avg = 4,
/// Median.
Median = 5,
/// Standard deviation.
StdDev = 6,
}
impl Aggregation {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Aggregation::Unspecified => "AGGREGATION_UNSPECIFIED",
Aggregation::Min => "AGGREGATION_MIN",
Aggregation::Max => "AGGREGATION_MAX",
Aggregation::Avg => "AGGREGATION_AVG",
Aggregation::Median => "AGGREGATION_MEDIAN",
Aggregation::StdDev => "AGGREGATION_STD_DEV",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AGGREGATION_UNSPECIFIED" => Some(Self::Unspecified),
"AGGREGATION_MIN" => Some(Self::Min),
"AGGREGATION_MAX" => Some(Self::Max),
"AGGREGATION_AVG" => Some(Self::Avg),
"AGGREGATION_MEDIAN" => Some(Self::Median),
"AGGREGATION_STD_DEV" => Some(Self::StdDev),
_ => None,
}
}
}
/// Comparison operator.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Comparison {
/// Unspecified.
Unspecified = 0,
/// Less than the specified value.
Lt = 1,
/// Less than or equal to the specified value.
Lte = 2,
/// Greater than the specified value.
Gt = 3,
/// Greater than or equal to the specified value.
Gte = 4,
}
impl Comparison {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Comparison::Unspecified => "COMPARISON_UNSPECIFIED",
Comparison::Lt => "COMPARISON_LT",
Comparison::Lte => "COMPARISON_LTE",
Comparison::Gt => "COMPARISON_GT",
Comparison::Gte => "COMPARISON_GTE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COMPARISON_UNSPECIFIED" => Some(Self::Unspecified),
"COMPARISON_LT" => Some(Self::Lt),
"COMPARISON_LTE" => Some(Self::Lte),
"COMPARISON_GT" => Some(Self::Gt),
"COMPARISON_GTE" => Some(Self::Gte),
_ => None,
}
}
}
/// An actual value of test's KPI.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KpiValue {
/// ID of a test.
#[prost(string, tag = "1")]
pub test_id: ::prost::alloc::string::String,
/// Value of KPI.
#[prost(double, tag = "2")]
pub value: f64,
/// A flag indicating whether the value satisfies KPI threshold condition.
#[prost(bool, tag = "3")]
pub is_ok: bool,
}
/// Report status.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Status {
/// Status is not specified.
Unspecified = 0,
/// Report is being collected.
Collecting = 1,
/// Report is being calculated.
Calculating = 2,
/// Report is ready.
Ready = 3,
}
impl Status {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Collecting => "COLLECTING",
Status::Calculating => "CALCULATING",
Status::Ready => "READY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"COLLECTING" => Some(Self::Collecting),
"CALCULATING" => Some(Self::Calculating),
"READY" => Some(Self::Ready),
_ => None,
}
}
}