1# Copyright 2013 The Chromium 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
6class ProjectConfig(object):
7  """Contains information about the benchmark runtime environment.
8
9  Attributes:
10    top_level_dir: A dir that contains benchmark, page test, and/or story
11        set dirs and associated artifacts.
12    benchmark_dirs: A list of dirs containing benchmarks.
13    benchmark_aliases: A dict of name:alias string pairs to be matched against
14        exactly during benchmark selection.
15    client_config: A path to a ProjectDependencies json file.
16    default_chrome_root: A path to chromium source directory. Many telemetry
17      features depend on chromium source tree's presence and those won't work
18      in case this is not specified.
19  """
20  def __init__(self, top_level_dir, benchmark_dirs=None,
21               benchmark_aliases=None, client_config=None,
22               default_chrome_root=None):
23    self._top_level_dir = top_level_dir
24    self._benchmark_dirs = benchmark_dirs or []
25    self._benchmark_aliases = benchmark_aliases or dict()
26    self._client_config = client_config or ''
27    self._default_chrome_root = default_chrome_root
28
29  @property
30  def top_level_dir(self):
31    return self._top_level_dir
32
33  @property
34  def benchmark_dirs(self):
35    return self._benchmark_dirs
36
37  @property
38  def benchmark_aliases(self):
39    return self._benchmark_aliases
40
41  @property
42  def client_config(self):
43    return self._client_config
44
45  @property
46  def default_chrome_root(self):
47    return self._default_chrome_root
48