Skip to content

Commit 80b2591

Browse files
committed
[feldera-types] Add host ordinal to parameters for samply endpoints.
Signed-off-by: Ben Pfaff <blp@feldera.com>
1 parent e93f57c commit 80b2591

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

crates/feldera-types/src/query_params.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,19 @@ impl Default for ActivateParams {
4545
#[derive(Debug, Deserialize, Serialize, IntoParams, ToSchema)]
4646
#[serde(default)]
4747
pub struct SamplyProfileParams {
48+
/// In a multihost pipeline, the ordinal of the pipeline to sample.
49+
pub ordinal: usize,
50+
/// The number of seconds to sample for the profile.
4851
pub duration_secs: u64,
4952
}
5053

5154
/// Default query parameters for POST of a pipeline samply profile.
5255
impl Default for SamplyProfileParams {
5356
fn default() -> Self {
54-
Self { duration_secs: 30 }
57+
Self {
58+
ordinal: 0,
59+
duration_secs: 30,
60+
}
5561
}
5662
}
5763

@@ -60,6 +66,8 @@ impl Default for SamplyProfileParams {
6066
#[into_params(parameter_in = Query)]
6167
#[serde(default)]
6268
pub struct SamplyProfileGetParams {
69+
/// In a multihost pipeline, the ordinal of the pipeline to sample.
70+
pub ordinal: usize,
6371
/// If true, returns 204 redirect with Retry-After header if profile collection is in progress.
6472
/// If false or not provided, returns the last collected profile.
6573
pub latest: bool,

0 commit comments

Comments
 (0)