def run(): framework = Framework() framework.command = "ls" framework.numRuns = 3 framework.params = [('-l', ['']), ('-a', [''])] framework.runBenchmarks() framework.ppOutput()
def run(): framework = Framework() framework.command = "echo" framework.params = [('-r', ['1']), ('-t', ['A']), ('-m', ['X', 'Y', 'Z']), ('-p', [''])] framework.runBenchmarks() framework.ppOutput()
def run(): framework = Framework() framework.command = "cat" framework.numRuns = 3 framework.params = [('', ['ls_test.py', 'cat_test.py', 'framework.py'])] framework.runBenchmarks() framework.ppOutput()
def run_s(): def parse(output, headers): return {framework.outputHeaders[0]: float(output)} framework = Framework() framework.command = "ib_send_bw" framework.numRuns = 3 framework.isClient = True framework.outputParser = parse framework.headerNames = ['Duration in Seconds (-D)', 'TxDepth (-t)'] framework.outputHeaders = ['Bandwidth in Gb/s'] framework.params = [('-D', ['1', '3', '5']), ('-t', ['256', '512']), ('-R', ['']), ('tnvme40Gp1', ['']), ('--report_gbits', ['']), ('--output=', ['bandwidth'])] framework.runBenchmarks()
def run_t(): def parse(output, headers): return {framework.outputHeaders[0]: float(output)} framework = Framework() framework.command = "ib_send_lat" framework.numRuns = 3 framework.isClient = False framework.outputParser = parse framework.waitTime = 0.5 framework.headerNames = ['Duration in Seconds (-D)', 'TxDepth (-t)'] framework.outputHeaders = ['Latency in usec'] framework.params = [('-D', ['1', '3', '5']), ('-t', ['256', '512']), ('-R', ['']), ('--report_gbits', ['']), ('--output=', ['latency'])] framework.runBenchmarks()
def run(): def parse(output, headers): pOutput = output.split(';') outputIndices = [ # Read Bandwidth 6, # Read IOPS 7, # Read Latency 37, 38, 39, 40, # Write Bandwidth 47, # Write IOPS 48, # Write Latency 78, 79, 80, 81, # User CPU 87, # System CPU 88, ] outputResults = [pOutput[index] for index in outputIndices] return dict(zip(headers, outputResults)) framework = Framework() if Framework.ramDiskPath == Framework.localRamDiskPath: framework.isClient = True else: framework.isClient = False framework.outputParser = parse framework.waitTime = 3 framework.command = "/usr/local/bin/fio" framework.numRuns = 1 framework.headerNames = [ 'IO Type', 'Blocksize', 'Number of Jobs', 'IO Depth', 'Data size', 'Duration', 'IO Engine', # 'Time Based', # 'Number of Iterations', # 'Minimal output', # 'Fsync on close', # 'Seed RNG for predictable runs', # 'No Random Map', # 'Group Output Together', # 'Exit all jobs after first finishes', # 'Task name', # 'Data Directory', ] framework.params = [ ('--rw=', [ 'read', 'write', 'randread', 'randwrite', ]), #'rw', 'randrw']), #('--bs=', ['1k', '4k', '8k', '1M', '10M', '100M', '1G']), ('--bs=', ['4k', '32k', '64k']), ('--numjobs=', ['1']), ('--iodepth=', ['1', '32', '64']), ('--size=', ['40G']), ('--runtime=', ['10']), ('--ioengine=', ['libaio']), # Lines below will not be outputted ('--time_based', ['']), ('--loops=', ['1']), ('--minimal', ['']), ('--fsync_on_close=', ['0']), ('--randrepeat=', ['1']), ('--norandommap', ['']), ('--group_reporting', ['']), ('--exitall', ['']), ('--name=', ['task1']), #('--direct=', ['1']), ('--directory=', [Framework.ramDiskPath]), ] framework.outputHeaders = [ 'Read Bandwidth (KB/s)', 'Read IOPS', 'Read Latency Min (ms)', 'Read Latency Max (ms)', 'Read Latency Avg (ms)', 'Read Latency Dev (ms)', 'Write Bandwidth (KB/s)', 'Write IOPS', 'Write Latency Min (us)', 'Write Latency Max (us)', 'Write Latency Avg (us)', 'Write Latency Dev (us)', 'CPU Usage: User', 'CPU Usage: System', ] framework.runBenchmarks()