def measure_config(binary_path: PathLike, config: 'Config', profile_filename: str='profile_info.txt', qos_filename: str='final_accuracy'):
    from subprocess import check_call
    from tempfile import NamedTemporaryFile
    import os
    temp_file = NamedTemporaryFile('w')
    write_hpvm_configs('0.0', [config], Path(temp_file.name))
    try:
        with open(os.devnull, 'w') as f:
            check_call([str(binary_path), '-c', str(temp_file.name)], stdout=f)
    except CalledProcessError as e:
        print('Output from the program:')
        print(e.output)
        raise e
    time = _read_profile_file(Path(profile_filename))
    acc = _read_qos_file(Path(qos_filename))
    temp_file.close()
    return (time, acc)
def measure_config(binary_path: PathLike, config: 'Config', profile_filename: str='profile_info.txt', qos_filename: str='final_accuracy'):
    from subprocess import check_call
    from tempfile import NamedTemporaryFile
    import os
    temp_file = NamedTemporaryFile('w')
    write_hpvm_configs('0.0', [config], Path(temp_file.name))
    try:
        with open(os.devnull, 'w') as f:
            check_call([str(binary_path), '-c', str(temp_file.name)], stdout=f)
    except CalledProcessError as e:
        print('Output from the program:')
        print(e.output)
        raise e
    time = _read_profile_file(Path(profile_filename))
    acc = _read_qos_file(Path(qos_filename))
    temp_file.close()
    return (time, acc)