admin api: return full layout computation statistics as json (fix #1428)

This commit is contained in:
Alex Auvolat
2026-05-01 19:30:27 +02:00
committed by Alex
parent ada0c8ab70
commit 62349a6559
10 changed files with 284 additions and 129 deletions
+8
View File
@@ -618,6 +618,10 @@ pub enum PreviewClusterLayoutChangesResponse {
/// Plain-text information about the layout computation
/// (do not try to parse this)
message: Vec<String>,
/// Structured statistics about the layout computation
// FIXME for v3: remove default and skip_serializing_if
#[serde(default, skip_serializing_if = "Option::is_none")]
statistics: Option<Box<garage_rpc::layout::ComputationStat>>,
/// Details about the new cluster layout
new_layout: GetClusterLayoutResponse,
},
@@ -639,6 +643,10 @@ pub struct ApplyClusterLayoutResponse {
/// Plain-text information about the layout computation
/// (do not try to parse this)
pub message: Vec<String>,
/// Structured statistics about the layout computation
// FIXME for v3: remove default and skip_serializing_if
#[serde(default, skip_serializing_if = "Option::is_none")]
pub statistics: Option<garage_rpc::layout::ComputationStat>,
/// Details about the new cluster layout
pub layout: GetClusterLayoutResponse,
}