summaryrefslogtreecommitdiff
path: root/src/energy/trackers/mock.rs
blob: 231eb8f32c6f846ee1fb920c625fc1e648271fe7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::energy::estimator::Estimator;
#[derive(Default)]
pub struct MockEstimator;

impl Estimator for MockEstimator {
    fn start_trace(&mut self, _pid: u64, _cpu: i32) -> Result<(), ()> {
        Ok(())
    }

    fn stop_trace(&mut self, _pid: u64) {}

    fn update_information(&mut self, _pid: u64, _cpu: i32) {}

    fn read_consumption(&mut self, _pid: u64) -> Option<f64> {
        Some(14.)
    }
}