#NEWLINE# def memory( ) : #NEWLINE# #INDENT# "\n    This tests the memory for read and write operations.\n\n    CLI Examples:\n\n    .. code-block:: bash\n\n        salt '*' sysbench.memory\n    " #NEWLINE# memory_oper = [ 'read' , 'write' ] #NEWLINE# memory_scope = [ 'local' , 'global' ] #NEWLINE# test_command = 'sysbench --num-threads=64 --test=memory ' #NEWLINE# test_command += '--memory-oper={0} --memory-scope={1} ' #NEWLINE# test_command += '--memory-block-size=1K --memory-total-size=32G run ' #NEWLINE# result = None #NEWLINE# ret_val = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for oper in memory_oper : #NEWLINE# #INDENT# for scope in memory_scope : #NEWLINE# #INDENT# key = 'Operation: {0} Scope: {1}' . format ( oper , scope ) #NEWLINE# run_command = test_command . format ( result , scope ) #NEWLINE# result = __salt__ [ 'cmd.run' ] ( run_command ) #NEWLINE# ret_val [ key ] = _parser ( result ) #NEWLINE# #UNINDENT# #UNINDENT# return ret_val