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 | |
13 # Add the gae_ts_mon/protobuf directory into the path for the google package, so | 10 # Add the gae_ts_mon/protobuf directory into the path for the google package, so |
14 # "import google.protobuf" works. | 11 # "import google.protobuf" works. |
15 protobuf_dir = os.path.join(os.path.dirname(__file__), 'protobuf') | 12 protobuf_dir = os.path.join(os.path.dirname(__file__), 'protobuf') |
16 google.__path__.append(os.path.join(protobuf_dir, 'google')) | 13 google.__path__.append(os.path.join(protobuf_dir, 'google')) |
17 sys.path.insert(0, protobuf_dir) | 14 sys.path.insert(0, protobuf_dir) |
18 | 15 |
19 # Pretend that we are the infra_libs.ts_mon package, so users can use the same | 16 # Pretend that we are the infra_libs.ts_mon package, so users can use the same |
20 # import lines in gae and non-gae code. | 17 # import lines in gae and non-gae code. |
21 try: | 18 try: |
22 import infra_libs | 19 import infra_libs |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 from infra_libs.ts_mon.common.metrics import CumulativeDistributionMetric | 57 from infra_libs.ts_mon.common.metrics import CumulativeDistributionMetric |
61 from infra_libs.ts_mon.common.metrics import CumulativeMetric | 58 from infra_libs.ts_mon.common.metrics import CumulativeMetric |
62 from infra_libs.ts_mon.common.metrics import DistributionMetric | 59 from infra_libs.ts_mon.common.metrics import DistributionMetric |
63 from infra_libs.ts_mon.common.metrics import FloatMetric | 60 from infra_libs.ts_mon.common.metrics import FloatMetric |
64 from infra_libs.ts_mon.common.metrics import GaugeMetric | 61 from infra_libs.ts_mon.common.metrics import GaugeMetric |
65 from infra_libs.ts_mon.common.metrics import NonCumulativeDistributionMetric | 62 from infra_libs.ts_mon.common.metrics import NonCumulativeDistributionMetric |
66 from infra_libs.ts_mon.common.metrics import StringMetric | 63 from infra_libs.ts_mon.common.metrics import StringMetric |
67 | 64 |
68 from infra_libs.ts_mon.common.targets import TaskTarget | 65 from infra_libs.ts_mon.common.targets import TaskTarget |
69 from infra_libs.ts_mon.common.targets import DeviceTarget | 66 from infra_libs.ts_mon.common.targets import DeviceTarget |
OLD | NEW |