tools/android/customtabs_benchmark/scripts/run_benchmark.py
def _Run(output_file_prefix, configs):
  """Loops the tests described by the configs on connected devices.

  Args:
    output_file_prefix: (str) Prefix for the output file name.
    configs: ([dict]) List of configurations.
  """
  devices = device_utils.DeviceUtils.HealthyDevices()
  stop_event = threading.Event()
  threads = []
  for device in devices:
    output_filename = '%s_%s.csv' % (output_file_prefix, str(device))
    thread = threading.Thread(
        target=customtabs_benchmark.LoopOnDevice,
        args=(device, configs, output_filename),
        kwargs={'should_stop': stop_event})
    thread.start()
    threads.append(thread)
  while any(thread.is_alive() for thread in threads):
    try:
      for thread in threads:
        if thread.is_alive():
          thread.join(1.)
    except KeyboardInterrupt as _:
      logging.warning('Stopping now.')
      stop_event.set()
Loops the tests described by the configs on connected devices.

  Args:
    output_file_prefix: (str) Prefix for the output file name.
    configs: ([dict]) List of configurations.
  
Loops the tests described by the configs on connected devices.
Loops the tests described by the configs on connected devices .
def _Run(output_file_prefix, configs):
  devices = device_utils.DeviceUtils.HealthyDevices()
  stop_event = threading.Event()
  threads = []
  for device in devices:
    output_filename = '%s_%s.csv' % (output_file_prefix, str(device))
    thread = threading.Thread(
        target=customtabs_benchmark.LoopOnDevice,
        args=(device, configs, output_filename),
        kwargs={'should_stop': stop_event})
    thread.start()
    threads.append(thread)
  while any(thread.is_alive() for thread in threads):
    try:
      for thread in threads:
        if thread.is_alive():
          thread.join(1.)
    except KeyboardInterrupt as _:
      logging.warning('Stopping now.')
      stop_event.set()
def _Run ( output_file_prefix , configs ) : devices = device_utils . DeviceUtils . HealthyDevices ( ) stop_event = threading . Event ( ) threads = [ ] for device in devices : output_filename = '%s_%s.csv' % ( output_file_prefix , str ( device ) ) thread = threading . Thread ( target = customtabs_benchmark . LoopOnDevice , args = ( device , configs , output_filename ) , kwargs = { 'should_stop' : stop_event } ) thread . start ( ) threads . append ( thread ) while any ( thread . is_alive ( ) for thread in threads ) : try : for thread in threads : if thread . is_alive ( ) : thread . join ( 1. ) except KeyboardInterrupt as _ : logging . warning ( 'Stopping now.' ) stop_event . set ( )
Loops the tests described by the configs on connected devices.
Loops the tests described by the configs on connected devices .
"""Loops the tests described by the configs on connected devices.

  Args:
    output_file_prefix: (str) Prefix for the output file name.
    configs: ([dict]) List of configurations.
  """
output_file_prefix
(str) Prefix for the output file name.
( str ) Prefix for the output file name .
configs
([dict]) List of configurations.
( [ dict ] ) List of configurations .