Home | History | Annotate | Download | only in native_Benchmarks
      1 # Copyright (c) 2015 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 from autotest_lib.client.common_lib import utils
      6 
      7 AUTHOR = "c-compiler-chrome (a] google.com"
      8 NAME = "native_Benchmarks.vp8"
      9 TIME = "LONG"
     10 TEST_CATEGORY = "Benchmark"
     11 TEST_CLASS = "performance"
     12 TEST_TYPE = "server"
     13 
     14 DOC = """
     15 Run vp8 encoder and decoder as benchmarks.
     16 """
     17 
     18 profiler = None
     19 p_args = []
     20 
     21 # Put the args into the args_dict.
     22 args_dict = utils.args_to_dict(args)
     23 
     24 if 'profiler' in args_dict:
     25    profiler = args_dict['profiler']
     26    if 'profiler_args' in args_dict:
     27       p_args   = args_dict['profiler_args']
     28 
     29 if profiler:
     30    job.default_profile_only = True
     31    job.profilers.add(profiler, p_args)
     32 
     33 def run_native_Benchmarks(machine):
     34     client = hosts.create_host(machine)
     35     job.run_test('native_Benchmarks', client=client, name='vp8', args=args)
     36 
     37 # run the test in multiple machines
     38 
     39 job.parallel_simple(run_native_Benchmarks, machines)
     40 
     41 if profiler:
     42    job.profilers.delete (profiler)
     43