Lines Matching +full:test +full:- +full:path
3 # Test to compare performance of write requests for two qemu-img binary files.
5 # The idea of the test comes from intention to check the benefit of c8bb23cbdbe
40 '''Run qemu-img and return its output'''
47 sys.stderr.write('qemu-img received signal %i: %s\n'
48 % (-exitcode, ' '.join(list(args))))
56 The function creates a QCOW2 image with the given path/name. Then it runs
57 the 'qemu-img bench' command and makes series of write requests on the
61 qemu_img -- path to qemu_img executable file
62 image_name -- QCOW2 image name to create
63 block_size -- size of a block to write to clusters
64 block_offset -- offset of the block in clusters
65 cluster_size -- size of the image cluster
71 if not os.path.isfile(qemu_img):
75 image_dir = os.path.dirname(os.path.abspath(image_name))
76 if not os.path.isdir(image_dir):
77 print(f'Path not found: {image_name}')
82 args_create = [qemu_img, 'create', '-f', 'qcow2', '-o',
86 count = int(image_size / cluster_size) - 1
89 args_bench = [qemu_img, 'bench', '-w', '-n', '-t', 'none', '-c',
90 str(count), '-s', f'{block_size}', '-o', str(block_offset),
91 '-S', step, '-f', 'qcow2', image_name]
110 return {'seconds': float(ret_list[index-1])}
118 program = os.path.basename(sys.argv[0])
119 print(f'USAGE: {program} <path to qemu-img binary file> '
120 '<path to another qemu-img to compare performance with> '
124 # Test-cases are "rows" in benchmark resulting table, 'id' is a caption
153 # Test-envs are "columns" in benchmark resulting table, 'id is a caption
158 'id': '<qemu-img binary 1>',
163 'id': '<qemu-img binary 2>',