# Path: hardware/benchmark/utils.py
# def get_value(hw_lst, level1, level2, level3):
# def get_one_cpu_per_socket(hw_lst):


import subprocess
import sys
from hardware.benchmark import utils
    cpuinfo.close()
    return None


def get_bogomips(hw_lst, processor_num):
    """Get the number og bogomips of a given CPU."""
    bogo = search_cpuinfo(processor_num, "bogomips")
    if bogo is not None:
        hw_lst.append(('cpu', 'logical_%d' % processor_num, 'bogomips', bogo))


def get_cache_size(hw_lst, processor_num):
    """Get the cache size of a given CPU."""
    cache_size = search_cpuinfo(processor_num, "cache size")
    if cache_size is not None:
        hw_lst.append(('cpu', 'logical_%d' % processor_num,
                       'cache_size', cache_size))


def cpu_perf(hw_lst, max_time=10, burn_test=False):
    """Perform CPU's performance test.

    :param hw_lst: The hardware inventory list.
    :param max_time: Limit for total execution time in seconds.
        Defaults to 10.
    :param burn_test: Boolean value. Whether to perform a burn
        test. Defaults to False.

    """
    logical = utils.get_value(hw_lst, 'cpu', 'logical', 'number')

# Path: hardware/benchmark/utils.py
# def get_value(hw_lst, level1, level2, level3):
# def get_one_cpu_per_socket(hw_lst):


# Path: hardware/benchmark/cpu.py
import subprocess
import sys
from hardware.benchmark import utils

    cpuinfo.close()
    return None


def get_bogomips(hw_lst, processor_num):
    """Get the number og bogomips of a given CPU."""
    bogo = search_cpuinfo(processor_num, "bogomips")
    if bogo is not None:
        hw_lst.append(('cpu', 'logical_%d' % processor_num, 'bogomips', bogo))


def get_cache_size(hw_lst, processor_num):
    """Get the cache size of a given CPU."""
    cache_size = search_cpuinfo(processor_num, "cache size")
    if cache_size is not None:
        hw_lst.append(('cpu', 'logical_%d' % processor_num,
                       'cache_size', cache_size))


def cpu_perf(hw_lst, max_time=10, burn_test=False):
    """Perform CPU's performance test.

    :param hw_lst: The hardware inventory list.
    :param max_time: Limit for total execution time in seconds.
        Defaults to 10.
    :param burn_test: Boolean value. Whether to perform a burn
        test. Defaults to False.

    """
    logical = utils.get_value(hw_lst, 'cpu', 'logical', 'number')

    physical = utils.get_value(hw_lst, 'cpu', 'physical', 'number')