Sha256: 534a34e1e88f9b9ec7594bb7ac8b2548a03ad52d5a6f95b5bce580276ad3155a
Contents?: true
Size: 423 Bytes
Versions: 7
Compression:
Stored size: 423 Bytes
Contents
module OvirtMetrics class HostSamplesHistory < OvirtHistory belongs_to :host_configuration, :foreign_key => :host_configuration_version def cpu_usagemhz_rate_average return 0.0 if self.host_configuration.nil? speed_of_host = self.host_configuration.cpu_speed_mh.to_f * self.host_configuration.number_of_cores.to_i return (speed_of_host * (self.cpu_usage_percent.to_f / 100.0)) end end end
Version data entries
7 entries across 7 versions & 1 rubygems