Struct scaphandre::sensors::Domain [−][src]
pub struct Domain {
pub id: u16,
pub name: String,
pub counter_uj_path: String,
pub record_buffer: Vec<Record>,
pub buffer_max_kbytes: u16,
}
Expand description
Domain struct represents a part of a CPUSocket from the electricity consumption point of view.
Fields
id: u16
Numerical ID of the RAPL domain as indicated in /sys/class/powercap/intel-rapl* folders names
name: String
Name of the domain as found in /sys/class/powercap/intel-rapl:X:X/name
counter_uj_path: String
Path to the domain’s energy counter file, microjoules extracted
record_buffer: Vec<Record>
History of energy consumption measurements, stored as Record instances
buffer_max_kbytes: u16
Maximum size of record_buffer, in kilobytes
Implementations
Reads content of this domain’s energy_uj file
Returns a Record instance containing the power consumed between last and previous measurement, in microwatts.
Trait Implementations
Computes a measurement of energy comsumption for this CPU domain, stores a copy in self.record_buffer and returns it.
Removes as many Record instances from self.record_buffer as needed for record_buffer to take less than ‘buffer_max_kbytes’ in memory
Returns a copy of self.record_buffer
Auto Trait Implementations
impl RefUnwindSafe for Domain
impl UnwindSafe for Domain
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more