Class: Nl::Linux::DevEnergymodel::AttributeSets::PerfState

Inherits:
AttributeSet
  • Object
show all
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

AttributeSet::SELECTOR_NAMES

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • name (Symbol)

Returns:



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.

Parameters:

  • type (Integer)

Returns:



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.

Returns:

  • (Integer)

See Also:



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.

Returns:

  • (Integer)

See Also:



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.

Returns:

  • (Integer)

See Also:



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.

Returns:

  • (Integer)

See Also:



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.

Returns:

  • (Integer)

See Also:



261
# File 'nl-linux/generated/nl/linux/dev_energymodel.rb', line 261

def power; self[:"power"]&.value; end