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



43
44
45
# File 'lib/osctld/cpu_scheduler.rb', line 43

def container_count
  @container_count
end

#cpu_maskObject

Returns the value of attribute cpu_mask

Returns:

  • (Object)

    the current value of cpu_mask



43
44
45
# File 'lib/osctld/cpu_scheduler.rb', line 43

def cpu_mask
  @cpu_mask
end

#enabledObject

Returns the value of attribute enabled

Returns:

  • (Object)

    the current value of enabled



43
44
45
# File 'lib/osctld/cpu_scheduler.rb', line 43

def enabled
  @enabled
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



43
44
45
# File 'lib/osctld/cpu_scheduler.rb', line 43

def id
  @id
end

#usage_scoreObject

Returns the value of attribute usage_score

Returns:

  • (Object)

    the current value of usage_score



43
44
45
# File 'lib/osctld/cpu_scheduler.rb', line 43

def usage_score
  @usage_score
end

Instance Method Details

#container_count_per_cpuObject



55
56
57
# File 'lib/osctld/cpu_scheduler.rb', line 55

def container_count_per_cpu
  container_count / cpu_mask.size.to_f
end

#usage_score_per_cpuObject



51
52
53
# File 'lib/osctld/cpu_scheduler.rb', line 51

def usage_score_per_cpu
  usage_score / cpu_mask.size.to_f
end