Class: OsCtld::CpuScheduler::PackageInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/osctld/cpu_scheduler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#container_countObject

Returns the value of attribute container_count

Returns:

  • (Object)

    the current value of container_count



45
46
47
# File 'lib/osctld/cpu_scheduler.rb', line 45

def container_count
  @container_count
end

#cpu_maskObject

Returns the value of attribute cpu_mask

Returns:

  • (Object)

    the current value of cpu_mask



45
46
47
# File 'lib/osctld/cpu_scheduler.rb', line 45

def cpu_mask
  @cpu_mask
end

#enabledObject

Returns the value of attribute enabled

Returns:

  • (Object)

    the current value of enabled



45
46
47
# File 'lib/osctld/cpu_scheduler.rb', line 45

def enabled
  @enabled
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



45
46
47
# File 'lib/osctld/cpu_scheduler.rb', line 45

def id
  @id
end

#usage_scoreObject

Returns the value of attribute usage_score

Returns:

  • (Object)

    the current value of usage_score



45
46
47
# File 'lib/osctld/cpu_scheduler.rb', line 45

def usage_score
  @usage_score
end

Instance Method Details

#container_count_per_cpuObject



57
58
59
# File 'lib/osctld/cpu_scheduler.rb', line 57

def container_count_per_cpu
  container_count / cpu_mask.size.to_f
end

#usage_score_per_cpuObject



53
54
55
# File 'lib/osctld/cpu_scheduler.rb', line 53

def usage_score_per_cpu
  usage_score / cpu_mask.size.to_f
end