()
Display CPU information.
    Assumes all CPUs are the same.
Display CPU information.
    Assumes all CPUs are the same.
Display CPU information . Assumes all CPUs are the same .
def display_cpu_information():
    """
    Display CPU information.
    Assumes all CPUs are the same.
    """
    import cpuinfo
    output_string = '\n-- INFORMATION: CPU -------------------\n'
    cpu_info = cpuinfo.get_cpu_info()
    try:
        output_string = add_param_to_output(output_string,
                                            'brand',
                                            cpu_info['brand'])
        output_string = add_param_to_output(output_string,
                                            'vendor id',
                                            cpu_info['vendor_id'])
        output_string = add_param_to_output(output_string,
                                            'model',
                                            cpu_info['model'])
        output_string = add_param_to_output(output_string,
                                            'family',
                                            cpu_info['family'])
        output_string = add_param_to_output(output_string,
                                            'bits',
                                            cpu_info['bits'])
        output_string = add_param_to_output(output_string,
                                            'architecture',
                                            cpu_info['arch'])
        output_string = add_param_to_output(output_string,
                                            'cores',
                                            cpu_info['count'])
        output_string = add_param_to_output(output_string,
                                            'advertised Hz',
                                            cpu_info['hz_advertised'])
        output_string = add_param_to_output(output_string,
                                            'actual Hz',
                                            cpu_info['hz_actual'])
        output_string = add_param_to_output(output_string,
                                            'l2 cache size',
                                            cpu_info['l2_cache_size'])
    except Exception:
        output_string += 'Some CPU information cannot be displayed\n'
    output_string += '----------------------------------------'
    neon_logger.display(output_string)
def display_cpu_information ( ) : import cpuinfo output_string = '\n-- INFORMATION: CPU -------------------\n' cpu_info = cpuinfo . get_cpu_info ( ) try : output_string = add_param_to_output ( output_string , 'brand' , cpu_info [ 'brand' ] ) output_string = add_param_to_output ( output_string , 'vendor id' , cpu_info [ 'vendor_id' ] ) output_string = add_param_to_output ( output_string , 'model' , cpu_info [ 'model' ] ) output_string = add_param_to_output ( output_string , 'family' , cpu_info [ 'family' ] ) output_string = add_param_to_output ( output_string , 'bits' , cpu_info [ 'bits' ] ) output_string = add_param_to_output ( output_string , 'architecture' , cpu_info [ 'arch' ] ) output_string = add_param_to_output ( output_string , 'cores' , cpu_info [ 'count' ] ) output_string = add_param_to_output ( output_string , 'advertised Hz' , cpu_info [ 'hz_advertised' ] ) output_string = add_param_to_output ( output_string , 'actual Hz' , cpu_info [ 'hz_actual' ] ) output_string = add_param_to_output ( output_string , 'l2 cache size' , cpu_info [ 'l2_cache_size' ] ) except Exception : output_string += 'Some CPU information cannot be displayed\n' output_string += '----------------------------------------' neon_logger . display ( output_string )