fc-common: add build_metrics table and repository
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: If6842311f49bfcba9e1b11fa8bc9748c6a6a6964
This commit is contained in:
parent
80fece6fa8
commit
f8f9703faa
4 changed files with 126 additions and 0 deletions
|
|
@ -164,6 +164,26 @@ pub struct BuildDependency {
|
|||
pub dependency_build_id: Uuid,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, FromRow)]
|
||||
pub struct BuildMetric {
|
||||
pub id: Uuid,
|
||||
pub build_id: Uuid,
|
||||
pub metric_name: String,
|
||||
pub metric_value: f64,
|
||||
pub unit: String,
|
||||
pub collected_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
pub mod metric_names {
|
||||
pub const BUILD_DURATION_SECONDS: &str = "build_duration_seconds";
|
||||
pub const OUTPUT_SIZE_BYTES: &str = "output_size_bytes";
|
||||
}
|
||||
|
||||
pub mod metric_units {
|
||||
pub const SECONDS: &str = "seconds";
|
||||
pub const BYTES: &str = "bytes";
|
||||
}
|
||||
|
||||
/// Active jobset view — enabled jobsets joined with project info.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, FromRow)]
|
||||
pub struct ActiveJobset {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue