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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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