Class: Distem::Resource::CPU::Core
- Inherits:
-
Object
- Object
- Distem::Resource::CPU::Core
- Defined in:
- lib/distem/resource/cpu.rb
Overview
Abstract representation of a physical Core resource
Instance Attribute Summary (collapse)
-
- (Object) cache_links
Cores which have a critical cache link with this one.
-
- (Object) coreid
readonly
The logical id of the Core (used by some softwares).
-
- (Object) frequencies
readonly
Available frequencies of that core (CPU throttling).
-
- (Object) frequency
readonly
The actually set frequency (KHz).
-
- (Object) physicalid
readonly
The physical (unique) id of the Core (cgroups, cpufreq, field processor in /proc/cpuinfo).
Instance Method Summary (collapse)
-
- (Core) initialize(physicalid, coreid, freq, freqs)
constructor
Create a new Core ==== Attributes *
physicalid
The physical (unique) id of the Core (cgroups, cpufreq, field processor in /proc/cpuinfo) *coreid
The logical id of the Core (used by some softwares) *freq
The actually set (KHz) *freqs
Available frequencies of that core (CPU throttling).
Constructor Details
- (Core) initialize(physicalid, coreid, freq, freqs)
Create a new Core
Attributes
-
physicalid
The physical (unique) id of the Core (cgroups, cpufreq, field processor in /proc/cpuinfo) -
coreid
The logical id of the Core (used by some softwares) -
freq
The actually set (KHz) -
freqs
Available frequencies of that core (CPU throttling)
27 28 29 30 31 32 33 |
# File 'lib/distem/resource/cpu.rb', line 27 def initialize(physicalid,coreid,freq,freqs) @physicalid = physicalid @coreid = coreid @frequency = freq @frequencies = freqs.sort @cache_links = [] end |
Instance Attribute Details
- (Object) cache_links
Cores which have a critical cache link with this one
18 19 20 |
# File 'lib/distem/resource/cpu.rb', line 18 def cache_links @cache_links end |
- (Object) coreid (readonly)
The logical id of the Core (used by some softwares)
12 13 14 |
# File 'lib/distem/resource/cpu.rb', line 12 def coreid @coreid end |
- (Object) frequencies (readonly)
Available frequencies of that core (CPU throttling)
16 17 18 |
# File 'lib/distem/resource/cpu.rb', line 16 def frequencies @frequencies end |
- (Object) frequency (readonly)
The actually set frequency (KHz)
14 15 16 |
# File 'lib/distem/resource/cpu.rb', line 14 def frequency @frequency end |
- (Object) physicalid (readonly)
The physical (unique) id of the Core (cgroups, cpufreq, field processor in /proc/cpuinfo)
10 11 12 |
# File 'lib/distem/resource/cpu.rb', line 10 def physicalid @physicalid end |