@contract
def calculate_cpu_mhz(cpu_mhz, previous_time, current_time,
                      previous_cpu_time, current_cpu_time):
    return int(cpu_mhz * float(current_cpu_time - previous_cpu_time) / \
               ((current_time - previous_time) * 1000000000))
Calculate the average CPU utilization in MHz for a period of time.
dataset/ETHPy150Open beloglazov/openstack-neat/neat/locals/collector.py/calculate_cpu_mhz