blob: 4a2d431e59673d98be033495353ed94c6f04d2ce [file] [log] [blame]
Ahmad Sharif0dcbc4b2012-02-02 16:37:18 -08001#!/usr/bin/python
2
Yunlian Jiang04dc5dc2013-04-23 15:05:05 -07003# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
Ahmad Sharif0dcbc4b2012-02-02 16:37:18 -08006
7
8class Benchmark(object):
9 """Class representing a benchmark to be run.
10
Yunlian Jiang04dc5dc2013-04-23 15:05:05 -070011 Contains details of the benchmark suite, arguments to pass to the suite,
12 iterations to run the benchmark suite and so on. Note that the benchmark name
13 can be different to the test suite name. For example, you may want to have
14 two different benchmarks which run the same test_name with different
Ahmad Sharif0dcbc4b2012-02-02 16:37:18 -080015 arguments.
16 """
17
Yunlian Jiang04dc5dc2013-04-23 15:05:05 -070018 def __init__(self, name, test_name, test_args, iterations,
19 outlier_range, key_results_only, rm_chroot_tmp, perf_args,
20 suite="pyauto"):
Ahmad Sharif0dcbc4b2012-02-02 16:37:18 -080021 self.name = name
Yunlian Jiang04dc5dc2013-04-23 15:05:05 -070022 #For telemetry, this is the benchmark name.
23 self.test_name = test_name
24 #For telemetry, this is the data.
25 self.test_args = test_args
Ahmad Sharif0dcbc4b2012-02-02 16:37:18 -080026 self.iterations = iterations
27 self.outlier_range = outlier_range
Ahmad Shariff395c262012-10-09 17:48:09 -070028 self.perf_args = perf_args
Luis Lozanof81680c2013-03-15 14:44:13 -070029 self.key_results_only = key_results_only
30 self.rm_chroot_tmp = rm_chroot_tmp
Ahmad Sharif4467f002012-12-20 12:09:49 -080031 self.iteration_adjusted = False
Yunlian Jiang04dc5dc2013-04-23 15:05:05 -070032 self.suite = suite