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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
/// Agent selection criterion.
///
/// The structure is used by service to determine on which agents a specific test should be executed.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentSelector {
#[prost(oneof = "agent_selector::Agent", tags = "1, 2, 3")]
pub agent: ::core::option::Option<agent_selector::Agent>,
}
/// Nested message and enum types in `AgentSelector`.
pub mod agent_selector {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Agent {
/// Selection by agent ID.
#[prost(string, tag = "1")]
AgentId(::prost::alloc::string::String),
/// Selection by filter string.
#[prost(string, tag = "2")]
MatchByFilter(::prost::alloc::string::String),
/// Select anonymoud (i.e. not registered) agents.
#[prost(bool, tag = "3")]
AnonymousAgent(bool),
}
}
/// Artifact upload settings.
///
/// Defines where to upload test artifacts and which files should be included.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArtifactSettings {
/// Setting which defines whether artifact files should be archived prior to uploading.
#[prost(bool, tag = "6")]
pub is_archive: bool,
/// Filter strings defining which files should be included to artifacts. GLOB format.
///
/// Example:
/// - \['*'\] - all files will be uploaded.
/// - ['*.log', '*.yaml] - all `.log` and `.yaml` files will be uploaded.
#[prost(string, repeated, tag = "7")]
pub filter_include: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Filter strings defining which files should be excluded from artifacts. GLOB format.
///
/// Example:
/// - filter_include=\['*'\], filter_exclude=\['phout.log'\] - upload all `.log` files excluding `phout.log`.
#[prost(string, repeated, tag = "8")]
pub filter_exclude: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(oneof = "artifact_settings::UploadTo", tags = "1")]
pub upload_to: ::core::option::Option<artifact_settings::UploadTo>,
}
/// Nested message and enum types in `ArtifactSettings`.
pub mod artifact_settings {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum UploadTo {
/// Name of output object storage bucket in test's folder.
#[prost(string, tag = "1")]
ObjectStorageBucket(::prost::alloc::string::String),
}
}
/// Test meta information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Details {
/// Name of the test.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Description of the test.
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
/// Tags assigned to the test.
#[prost(message, repeated, tag = "3")]
pub tags: ::prost::alloc::vec::Vec<super::common::Tag>,
/// ID of the logging group to which test artifacts are uploaded.
#[prost(string, tag = "4")]
pub logging_log_group_id: ::prost::alloc::string::String,
/// Settings which define where to upload test artifacts and which files should be included.
#[prost(message, optional, tag = "5")]
pub artifact_settings: ::core::option::Option<ArtifactSettings>,
}
/// Reference to a file stored in Object Storage.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectStorage {
/// Bucket name.
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
/// File name.
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
/// Variant-like structure for referencing files in different sources.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FilePointer {
#[prost(oneof = "file_pointer::FilePointer", tags = "1")]
pub file_pointer: ::core::option::Option<file_pointer::FilePointer>,
}
/// Nested message and enum types in `FilePointer`.
pub mod file_pointer {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum FilePointer {
/// Reference to a file in Object Storage.
#[prost(message, tag = "1")]
ObjectStorage(super::ObjectStorage),
}
}
/// Test imbalance point.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImbalancePoint {
/// Imbalance moment timestamp.
#[prost(message, optional, tag = "1")]
pub at: ::core::option::Option<::prost_types::Timestamp>,
/// Imbalance moment RPS.
#[prost(int64, tag = "2")]
pub rps: i64,
/// Imbalance reason comment.
#[prost(string, tag = "3")]
pub comment: ::prost::alloc::string::String,
}
/// Configuration of a test.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SingleAgentConfiguration {
/// ID of the config.
#[prost(string, tag = "1")]
pub config_id: ::prost::alloc::string::String,
/// Agent selection criterion.
#[prost(message, optional, tag = "2")]
pub agent_selector: ::core::option::Option<AgentSelector>,
/// Additional files to be used during test execution, represented as `rel_path:file` pairs.
///
/// `rel_path` can be either a simple file name, a relative path, or absolute path. Files are
/// downloaded by the agent to appropriate location.
///
/// Use cases include:
/// - [Test Data files](/docs/load-testing/concepts/payload).
/// - Custom Pandora executable.
/// - JMeter executable or ".jmx" scenario.
/// - etc.
#[prost(map = "string, message", tag = "3")]
pub files: ::std::collections::HashMap<::prost::alloc::string::String, FilePointer>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Status {
/// Status is unspecified.
Unspecified = 0,
/// Test has been created, but not started by any agent.
Created = 1,
/// Execution stage: initialization.
Initiated = 2,
/// Execution stage: data preparation and warm-up.
Preparing = 3,
/// Execution stage: load generation.
Running = 4,
/// Execution stage: termination.
Finishing = 5,
/// Test is done.
Done = 6,
/// Execution stage: results post-processing.
PostProcessing = 7,
/// Test has failed due to some error.
Failed = 8,
/// Test is being stopped.
Stopping = 9,
/// Test has been stopped by user.
Stopped = 10,
/// Test has been stopped automatically by satisfying autostop condition.
Autostopped = 11,
/// Execution stage: waiting for a trigger to start.
Waiting = 12,
/// Test is being deleted.
Deleting = 13,
/// Test status has not been reported in a while during execution stage.
///
/// Means that either an agent is too busy to send it, got offline, or failed without
/// reporting a final status.
Lost = 14,
/// Test has been cancelled.
Cancelled = 15,
}
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::Created => "CREATED",
Status::Initiated => "INITIATED",
Status::Preparing => "PREPARING",
Status::Running => "RUNNING",
Status::Finishing => "FINISHING",
Status::Done => "DONE",
Status::PostProcessing => "POST_PROCESSING",
Status::Failed => "FAILED",
Status::Stopping => "STOPPING",
Status::Stopped => "STOPPED",
Status::Autostopped => "AUTOSTOPPED",
Status::Waiting => "WAITING",
Status::Deleting => "DELETING",
Status::Lost => "LOST",
Status::Cancelled => "CANCELLED",
}
}
/// 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),
"CREATED" => Some(Self::Created),
"INITIATED" => Some(Self::Initiated),
"PREPARING" => Some(Self::Preparing),
"RUNNING" => Some(Self::Running),
"FINISHING" => Some(Self::Finishing),
"DONE" => Some(Self::Done),
"POST_PROCESSING" => Some(Self::PostProcessing),
"FAILED" => Some(Self::Failed),
"STOPPING" => Some(Self::Stopping),
"STOPPED" => Some(Self::Stopped),
"AUTOSTOPPED" => Some(Self::Autostopped),
"WAITING" => Some(Self::Waiting),
"DELETING" => Some(Self::Deleting),
"LOST" => Some(Self::Lost),
"CANCELLED" => Some(Self::Cancelled),
_ => None,
}
}
}
/// Process of test and some results
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Summary {
/// Status of the test.
#[prost(enumeration = "Status", tag = "1")]
pub status: i32,
/// Creation timestamp.
#[prost(message, optional, tag = "2")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
/// UA or SA that created the test.
#[prost(string, tag = "3")]
pub created_by: ::prost::alloc::string::String,
/// Test start timestamp.
///
/// Empty if the test has not been started yet.
#[prost(message, optional, tag = "4")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
/// Test finish timestamp.
///
/// Empty if the test has not been finished yet.
#[prost(message, optional, tag = "5")]
pub finished_at: ::core::option::Option<::prost_types::Timestamp>,
/// Indicates whether the test is finished.
#[prost(bool, tag = "6")]
pub is_finished: bool,
/// Error message.
#[prost(string, tag = "7")]
pub error: ::prost::alloc::string::String,
/// Detected imbalance point.
///
/// Contains information about a state at the moment it has been
/// \[auto-stopped\](/docs/load-testing/concepts/auto-stop).
///
/// Empty if no auto-stop occured.
#[prost(message, optional, tag = "8")]
pub imbalance_point: ::core::option::Option<ImbalancePoint>,
/// ID of the agent that executed the test.
#[prost(string, tag = "9")]
pub assigned_agent_id: ::prost::alloc::string::String,
/// Test output artifacts.
///
/// Link to the artifacts output target containing `.log` and other files collected
/// during test execution.
#[prost(message, optional, tag = "10")]
pub artifacts: ::core::option::Option<FilePointer>,
}
/// Load Test.
///
/// In context of the service, Test represents a single testing task/job.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Test {
/// ID of the test. Generated at creation time.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Configuration of the test.
///
/// A test can have multiple configurations if it can be
/// executed on multiple agents simultaneously. For more information, see
/// [Load testing using multiple agents](/docs/load-testing/tutorials/loadtesting-multiply).
#[prost(message, repeated, tag = "2")]
pub configurations: ::prost::alloc::vec::Vec<SingleAgentConfiguration>,
/// Test meta information. Name, description, etc.
#[prost(message, optional, tag = "3")]
pub details: ::core::option::Option<Details>,
/// Test execution information.
#[prost(message, optional, tag = "4")]
pub summary: ::core::option::Option<Summary>,
/// ID of the folder that the test belongs to.
#[prost(string, tag = "5")]
pub folder_id: ::prost::alloc::string::String,
}