implemented safety features to prevent system damage
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
use ember_tune_rs::orchestrator::BenchmarkOrchestrator;
|
||||
use ember_tune_rs::sal::mock::MockSal;
|
||||
use ember_tune_rs::sal::heuristic::discovery::SystemFactSheet;
|
||||
use ember_tune_rs::load::Workload;
|
||||
use ember_tune_rs::load::{Workload, IntensityProfile, WorkloadMetrics};
|
||||
use std::time::Duration;
|
||||
use anyhow::Result;
|
||||
use std::sync::mpsc;
|
||||
use std::sync::Arc;
|
||||
use anyhow::Result;
|
||||
|
||||
struct MockWorkload;
|
||||
impl Workload for MockWorkload {
|
||||
fn start(&mut self, _threads: usize, _load_percent: usize) -> Result<()> { Ok(()) }
|
||||
fn stop(&mut self) -> Result<()> { Ok(()) }
|
||||
fn get_throughput(&self) -> Result<f64> { Ok(100.0) }
|
||||
fn initialize(&mut self) -> Result<()> { Ok(()) }
|
||||
fn run_workload(&mut self, _duration: Duration, _profile: IntensityProfile) -> Result<()> { Ok(()) }
|
||||
fn get_current_metrics(&self) -> Result<WorkloadMetrics> {
|
||||
Ok(WorkloadMetrics {
|
||||
primary_ops_per_sec: 100.0,
|
||||
elapsed_time: Duration::from_secs(1),
|
||||
})
|
||||
}
|
||||
fn stop_workload(&mut self) -> Result<()> { Ok(()) }
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user