OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import google # provided by GAE | 5 import google # provided by GAE |
6 import imp | 6 import imp |
7 import os | 7 import os |
8 import sys | 8 import sys |
9 | 9 |
| 10 # Adds itself to sys.path so the packages inside work. |
| 11 from . import third_party |
| 12 |
10 # Add the gae_ts_mon/protobuf directory into the path for the google package, so | 13 # Add the gae_ts_mon/protobuf directory into the path for the google package, so |
11 # "import google.protobuf" works. | 14 # "import google.protobuf" works. |
12 protobuf_dir = os.path.join(os.path.dirname(__file__), 'protobuf') | 15 protobuf_dir = os.path.join(os.path.dirname(__file__), 'protobuf') |
13 google.__path__.append(os.path.join(protobuf_dir, 'google')) | 16 google.__path__.append(os.path.join(protobuf_dir, 'google')) |
14 sys.path.insert(0, protobuf_dir) | 17 sys.path.insert(0, protobuf_dir) |
15 | 18 |
16 # Pretend that we are the infra_libs.ts_mon package, so users can use the same | 19 # Pretend that we are the infra_libs.ts_mon package, so users can use the same |
17 # import lines in gae and non-gae code. | 20 # import lines in gae and non-gae code. |
18 try: | 21 try: |
19 import infra_libs | 22 import infra_libs |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 from infra_libs.ts_mon.common.metrics import CumulativeDistributionMetric | 60 from infra_libs.ts_mon.common.metrics import CumulativeDistributionMetric |
58 from infra_libs.ts_mon.common.metrics import CumulativeMetric | 61 from infra_libs.ts_mon.common.metrics import CumulativeMetric |
59 from infra_libs.ts_mon.common.metrics import DistributionMetric | 62 from infra_libs.ts_mon.common.metrics import DistributionMetric |
60 from infra_libs.ts_mon.common.metrics import FloatMetric | 63 from infra_libs.ts_mon.common.metrics import FloatMetric |
61 from infra_libs.ts_mon.common.metrics import GaugeMetric | 64 from infra_libs.ts_mon.common.metrics import GaugeMetric |
62 from infra_libs.ts_mon.common.metrics import NonCumulativeDistributionMetric | 65 from infra_libs.ts_mon.common.metrics import NonCumulativeDistributionMetric |
63 from infra_libs.ts_mon.common.metrics import StringMetric | 66 from infra_libs.ts_mon.common.metrics import StringMetric |
64 | 67 |
65 from infra_libs.ts_mon.common.targets import TaskTarget | 68 from infra_libs.ts_mon.common.targets import TaskTarget |
66 from infra_libs.ts_mon.common.targets import DeviceTarget | 69 from infra_libs.ts_mon.common.targets import DeviceTarget |
OLD | NEW |