pub struct GenerationExperiment {
pub name: String,
pub device: ComputeDevice,
pub samples_generated: u64,
pub total_duration: Duration,
pub hourly_rate_usd: f64,
pub carbon_intensity: f64,
/* private fields */
}Expand description
Generation experiment tracker
Tracks synthetic data generation runs with timing, energy, and cost metrics.
Fields§
§name: StringExperiment name/ID
device: ComputeDeviceCompute device used
samples_generated: u64Total samples generated
total_duration: DurationTotal duration
hourly_rate_usd: f64Hourly compute rate in USD
carbon_intensity: f64Carbon intensity (g CO2/kWh)
Implementations§
Source§impl GenerationExperiment
impl GenerationExperiment
Sourcepub fn new(name: &str, device: ComputeDevice) -> Self
pub fn new(name: &str, device: ComputeDevice) -> Self
Create a new generation experiment
Sourcepub fn with_hourly_rate(self, rate_usd: f64) -> Self
pub fn with_hourly_rate(self, rate_usd: f64) -> Self
Set hourly compute rate
Sourcepub fn with_carbon_intensity(self, g_per_kwh: f64) -> Self
pub fn with_carbon_intensity(self, g_per_kwh: f64) -> Self
Set carbon intensity for CO2 calculation
Sourcepub fn record_samples(&mut self, count: u64, duration: Duration)
pub fn record_samples(&mut self, count: u64, duration: Duration)
Record samples generated with duration
Sourcepub fn finalize(&self) -> ExperimentMetrics
pub fn finalize(&self) -> ExperimentMetrics
Finalize and compute all metrics
Trait Implementations§
Source§impl Clone for GenerationExperiment
impl Clone for GenerationExperiment
Source§fn clone(&self) -> GenerationExperiment
fn clone(&self) -> GenerationExperiment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GenerationExperiment
impl RefUnwindSafe for GenerationExperiment
impl Send for GenerationExperiment
impl Sync for GenerationExperiment
impl Unpin for GenerationExperiment
impl UnsafeUnpin for GenerationExperiment
impl UnwindSafe for GenerationExperiment
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more