Class: Nl::Linux::DevEnergymodel::AttributeSets::PerfState
- Inherits:
-
AttributeSet
- Object
- AttributeSet
- Nl::Linux::DevEnergymodel::AttributeSets::PerfState
- Defined in:
- nl-linux/generated/nl/linux/dev_energymodel.rb
Overview
Performance state of a performance domain.
Defined Under Namespace
Classes: Attribute, Cost, Flags, Frequency, Pad, Performance, Power
Constant Summary
Constants inherited from AttributeSet
Class Method Summary collapse
-
.by_name(name) ⇒ Attribute
Looks up Attribute class by name.
-
.by_type(type) ⇒ Attribute
Looks up Attribute class by type value.
Instance Method Summary collapse
-
#cost ⇒ Integer
The cost coefficient associated with this level, used during energy calculation.
-
#flags ⇒ Integer
Bitmask of performance state flags.
-
#frequency ⇒ Integer
The frequency in KHz, for consistency with CPUFreq.
-
#performance ⇒ Integer
CPU performance (capacity) at a given frequency.
-
#power ⇒ Integer
The power consumed at this level (by 1 CPU or by a registered device).
Methods inherited from AttributeSet
#<<, #[], build_attributes, decode, #encode, #initialize
Constructor Details
This class inherits a constructor from Nl::AttributeSet
Class Method Details
.by_name(name) ⇒ Attribute
Looks up Attribute class by name.
280 |
# File 'nl-linux/generated/nl/linux/dev_energymodel.rb', line 280 def by_name(name); BY_NAME.fetch(name); end |
.by_type(type) ⇒ Attribute
Looks up Attribute class by type value.
286 |
# File 'nl-linux/generated/nl/linux/dev_energymodel.rb', line 286 def by_type(type); BY_TYPE.fetch(type); end |
Instance Method Details
#cost ⇒ Integer
The cost coefficient associated with this level, used during energy calculation. Equal to: power * max_frequency / frequency.
266 |
# File 'nl-linux/generated/nl/linux/dev_energymodel.rb', line 266 def cost; self[:"cost"]&.value; end |
#flags ⇒ Integer
Bitmask of performance state flags.
Known flags are defined in Flags::PerfStateFlags.
273 |
# File 'nl-linux/generated/nl/linux/dev_energymodel.rb', line 273 def flags; self[:"flags"]&.value; end |
#frequency ⇒ Integer
The frequency in KHz, for consistency with CPUFreq.
256 |
# File 'nl-linux/generated/nl/linux/dev_energymodel.rb', line 256 def frequency; self[:"frequency"]&.value; end |
#performance ⇒ Integer
CPU performance (capacity) at a given frequency.
251 |
# File 'nl-linux/generated/nl/linux/dev_energymodel.rb', line 251 def performance; self[:"performance"]&.value; end |
#power ⇒ Integer
The power consumed at this level (by 1 CPU or by a registered device). It can be a total power: static and dynamic.
261 |
# File 'nl-linux/generated/nl/linux/dev_energymodel.rb', line 261 def power; self[:"power"]&.value; end |