original_docstring: Runs act binary with provided config.
docstring: Runs act binary with provided config.
docstring_tokens: Runs act binary with provided config .
code: def RunAct(vm, index=None):
    """Runs act binary with provided config."""
    if index is None:
      config = 'actconfig.txt'
      output = 'output'
      act_config_metadata = {'device_index': 'all'}
    else:
      config = 'actconfig_{0}.txt'.format(index)
      output = 'output_{0}'.format(index)
      act_config_metadata = {'device_index': index}
    # Push config file to remote VM.
    vm.RobustRemoteCommand(
        'cd {0} && sudo ./act ~/{1} > ~/{2}'.format(
            ACT_DIR, config, output))
    # Shows 1,2,4,8,..,64
    out, _ = vm.RemoteCommand(
        'cd {0} && ./latency_calc/act_latency.py -n 7 -e 1 -l ~/{1}'.format(
            ACT_DIR, output))
    samples = ParseRunAct(out)
    act_config_metadata.update(
        GetActMetadata(len(vm.scratch_disks) - FLAGS.act_reserved_partitions))
    for s in samples:
      s.metadata.update(act_config_metadata)
    return samples
code_tokens: def RunAct ( vm , index = None ) : if index is None : config = 'actconfig.txt' output = 'output' act_config_metadata = { 'device_index' : 'all' } else : config = 'actconfig_{0}.txt' . format ( index ) output = 'output_{0}' . format ( index ) act_config_metadata = { 'device_index' : index } vm . RobustRemoteCommand ( 'cd {0} && sudo ./act ~/{1} > ~/{2}' . format ( ACT_DIR , config , output ) ) out , _ = vm . RemoteCommand ( 'cd {0} && ./latency_calc/act_latency.py -n 7 -e 1 -l ~/{1}' . format ( ACT_DIR , output ) ) samples = ParseRunAct ( out ) act_config_metadata . update ( GetActMetadata ( len ( vm . scratch_disks ) - FLAGS . act_reserved_partitions ) ) for s in samples : s . metadata . update ( act_config_metadata ) return samples
short_docstring: Runs act binary with provided config.
short_docstring_tokens: Runs act binary with provided config .
comment: """Runs act binary with provided config."""$SEP$# Push config file to remote VM.$SEP$# Shows 1,2,4,8,..,64