Minor changes
This commit is contained in:
parent
f60cdcf5b3
commit
728654f79a
@ -279,7 +279,8 @@ def execute(config, state):
|
||||
host_cpu_mhz)
|
||||
if log.isEnabledFor(logging.DEBUG):
|
||||
log.debug('Collected VM data: %s', str(cpu_mhz))
|
||||
log.debug('Overall host utilization: %s', str(host_cpu_mhz / state['physical_cpu_mhz']))
|
||||
log.debug('Overall host utilization: %s',
|
||||
str(float(host_cpu_mhz) / state['physical_cpu_mhz']))
|
||||
log.debug('Collected host CPU MHz: %s', str(host_cpu_mhz))
|
||||
log.debug('Collected VM CPU MHz: %s', str(sum(cpu_mhz.values())))
|
||||
log.debug('Collected host - VMs CPU MHz: %s', str(host_cpu_mhz - sum(cpu_mhz.values())))
|
||||
|
@ -485,7 +485,7 @@ class Collector(TestCase):
|
||||
context = mock('context')
|
||||
f = mock('file')
|
||||
when(context).__enter__().and_return(f)#.once()
|
||||
when(context).__exit__()
|
||||
when(context).__exit__.and_return(True)
|
||||
when(collector).open('/proc/stat', 'r').and_return(context)#.once()
|
||||
when(f).readline().and_return(
|
||||
'1 ' + ' '.join([str(v) for v in x]) + ' 2 3')#.once()
|
||||
|
Loading…
x
Reference in New Issue
Block a user