original_docstring: Runs the memtier benchmark on the vm.
docstring: Runs the memtier benchmark on the vm.
docstring_tokens: Runs the memtier benchmark on the vm .
code: def Run(vm, server_ip, server_port):
    """Runs the memtier benchmark on the vm."""
    memtier_ratio = '1:{0}'.format(FLAGS.memtier_ratio)
    samples = []
  
    for client_count in FLAGS.memtier_clients:
      vm.RemoteCommand('rm -f {0}'.format(MEMTIER_RESULTS))
      vm.RemoteCommand(
          'memtier_benchmark '
          '-s {server_ip} '
          '-p {server_port} '
          '-P {protocol} '
          '--run-count {run_count} '
          '--requests {requests} '
          '--clients {clients} '
          '--threads {threads} '
          '--ratio {ratio} '
          '--data-size {data_size} '
          '--key-pattern {key_pattern} '
          '--random-data > {output_file}'.format(
              server_ip=server_ip,
              server_port=server_port,
              protocol=FLAGS.memtier_protocol,
              run_count=FLAGS.memtier_run_count,
              requests=FLAGS.memtier_requests,
              clients=client_count,
              threads=FLAGS.memtier_threads,
              ratio=memtier_ratio,
              data_size=FLAGS.memtier_data_size,
              key_pattern=FLAGS.memtier_key_pattern,
              output_file=MEMTIER_RESULTS))
  
      results, _ = vm.RemoteCommand('cat {0}'.format(MEMTIER_RESULTS))
      metadata = GetMetadata()
      metadata['memtier_clients'] = client_count
      samples.extend(ParseResults(results, metadata))
  
    return samples
code_tokens: def Run ( vm , server_ip , server_port ) : memtier_ratio = '1:{0}' . format ( FLAGS . memtier_ratio ) samples = [ ] for client_count in FLAGS . memtier_clients : vm . RemoteCommand ( 'rm -f {0}' . format ( MEMTIER_RESULTS ) ) vm . RemoteCommand ( 'memtier_benchmark ' '-s {server_ip} ' '-p {server_port} ' '-P {protocol} ' '--run-count {run_count} ' '--requests {requests} ' '--clients {clients} ' '--threads {threads} ' '--ratio {ratio} ' '--data-size {data_size} ' '--key-pattern {key_pattern} ' '--random-data > {output_file}' . format ( server_ip = server_ip , server_port = server_port , protocol = FLAGS . memtier_protocol , run_count = FLAGS . memtier_run_count , requests = FLAGS . memtier_requests , clients = client_count , threads = FLAGS . memtier_threads , ratio = memtier_ratio , data_size = FLAGS . memtier_data_size , key_pattern = FLAGS . memtier_key_pattern , output_file = MEMTIER_RESULTS ) ) results , _ = vm . RemoteCommand ( 'cat {0}' . format ( MEMTIER_RESULTS ) ) metadata = GetMetadata ( ) metadata [ 'memtier_clients' ] = client_count samples . extend ( ParseResults ( results , metadata ) ) return samples
short_docstring: Runs the memtier benchmark on the vm.
short_docstring_tokens: Runs the memtier benchmark on the vm .
comment: """Runs the memtier benchmark on the vm."""