• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5from autotest_lib.client.common_lib import utils
6
7AUTHOR = "c-compiler-chrome@google.com"
8NAME = "native_Benchmarks.vp8"
9TIME = "LONG"
10TEST_CATEGORY = "Benchmark"
11TEST_CLASS = "performance"
12TEST_TYPE = "server"
13
14DOC = """
15Run vp8 encoder and decoder as benchmarks.
16"""
17
18profiler = None
19p_args = []
20
21# Put the args into the args_dict.
22args_dict = utils.args_to_dict(args)
23
24if 'profiler' in args_dict:
25   profiler = args_dict['profiler']
26   if 'profiler_args' in args_dict:
27      p_args   = args_dict['profiler_args']
28
29if profiler:
30   job.default_profile_only = True
31   job.profilers.add(profiler, p_args)
32
33def 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
39job.parallel_simple(run_native_Benchmarks, machines)
40
41if profiler:
42   job.profilers.delete (profiler)
43