pub struct GreenConfig {Show 18 fields
pub enabled: bool,
pub default_region: Option<String>,
pub service_regions: HashMap<String, String>,
pub embodied_carbon_per_request_gco2: f64,
pub use_hourly_profiles: bool,
pub scaphandre: Option<ScaphandreConfig>,
pub kepler: Option<KeplerConfig>,
pub alumet: Option<AlumetConfig>,
pub redfish: Option<RedfishConfig>,
pub cloud_energy: Option<CloudEnergyConfig>,
pub per_operation_coefficients: bool,
pub include_network_transport: bool,
pub network_energy_per_byte_kwh: f64,
pub hourly_profiles_file: Option<String>,
pub custom_hourly_profiles: Option<Arc<HashMap<String, HourlyProfile>>>,
pub calibration_file: Option<String>,
pub calibration: Option<CalibrationData>,
pub electricity_maps: Option<ElectricityMapsConfig>,
}Expand description
GreenOps / carbon scoring config. Maps to [green] in TOML.
Fields§
§enabled: bool§default_region: Option<String>Fallback region for CO₂ scoring (e.g. "eu-west-3").
service_regions: HashMap<String, String>Per-service region overrides. Keys lowercased at load time.
embodied_carbon_per_request_gco2: f64SCI M term: embodied carbon per request (gCO₂eq).
use_hourly_profiles: boolUse 24-hour carbon intensity profiles when available.
scaphandre: Option<ScaphandreConfig>Scaphandre RAPL scraper config (daemon only).
kepler: Option<KeplerConfig>Kepler eBPF energy scraper config (daemon only).
alumet: Option<AlumetConfig>Alumet energy scraper config (daemon only). Highest measured-energy precedence, overrides Scaphandre.
redfish: Option<RedfishConfig>Redfish BMC wall-plug-power scraper config (daemon only).
cloud_energy: Option<CloudEnergyConfig>Cloud CPU% + SPECpower config (daemon only).
per_operation_coefficients: boolWhether to use per-operation energy coefficients (SQL verb weighting,
HTTP payload size tiers) in the proxy model. Default: true.
include_network_transport: boolWhether to compute a network transport energy term for cross-region
HTTP calls. Default: false (opt-in).
network_energy_per_byte_kwh: f64Energy per byte for network transport (kWh/byte).
Default: 0.04 kWh/GB, a conservative upper bound below recent
whole-network averages (see DEFAULT_NETWORK_ENERGY_PER_BYTE_KWH).
hourly_profiles_file: Option<String>Path to user-supplied hourly profiles JSON file. None when not
configured (uses only embedded profiles).
custom_hourly_profiles: Option<Arc<HashMap<String, HourlyProfile>>>Pre-parsed custom hourly profiles, loaded at config parse time.
None when hourly_profiles_file is not set or failed to load.
calibration_file: Option<String>Path to a calibration TOML file generated by perf-sentinel calibrate.
calibration: Option<CalibrationData>Pre-loaded calibration data, parsed at config load time.
None when calibration_file is not set or failed to load.
electricity_maps: Option<ElectricityMapsConfig>Electricity Maps real-time carbon intensity config (daemon only).
Trait Implementations§
Source§impl Clone for GreenConfig
impl Clone for GreenConfig
Source§fn clone(&self) -> GreenConfig
fn clone(&self) -> GreenConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GreenConfig
impl Debug for GreenConfig
Auto Trait Implementations§
impl Freeze for GreenConfig
impl RefUnwindSafe for GreenConfig
impl Send for GreenConfig
impl Sync for GreenConfig
impl Unpin for GreenConfig
impl UnsafeUnpin for GreenConfig
impl UnwindSafe for GreenConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request