cardamon 0.0.1

Cardamon is a tool to help development teams measure the power consumption and carbon emissions of their software.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Debug)]
pub struct Page {
    pub size: u64,
    pub num: u64,
}
impl Page {
    pub fn new(size: u64, num: u64) -> Self {
        Self { size, num }
    }

    pub fn offset(&self) -> u64 {
        self.size * self.num
    }
}