redfish-codegen 0.3.1

An unopinionated translation of the Redfish specification into Rust.
Documentation
// Generated by redfish-codegen. Do not modify.


/// The processor core metrics.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct CacheMetrics {
    /// The number of cache line misses in millions.
    #[serde(rename = "CacheMiss")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cache_miss: Option<f64>,
    /// The number of cache misses per instruction.
    #[serde(rename = "CacheMissesPerInstruction")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cache_misses_per_instruction: Option<f64>,
    /// The cache line hit ratio.
    #[serde(rename = "HitRatio")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub hit_ratio: Option<f64>,
    /// The cache level.
    #[serde(rename = "Level")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub level: Option<String>,
    /// The total cache level occupancy in bytes.
    #[serde(rename = "OccupancyBytes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub occupancy_bytes: Option<i64>,
    /// The total cache occupancy percentage.
    #[serde(rename = "OccupancyPercent")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub occupancy_percent: Option<f64>,
}

impl crate::Metadata<'static> for CacheMetrics {
    const JSON_SCHEMA: &'static str = "ProcessorMetrics.v1_6_0.json";
}