| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 logging | 5 import logging |
| 6 | 6 |
| 7 from battor import battor_error | 7 from battor import battor_error |
| 8 from battor import battor_wrapper | 8 from battor import battor_wrapper |
| 9 from py_utils import cloud_storage | 9 from py_utils import cloud_storage |
| 10 from devil.android import battery_utils | 10 from devil.android import battery_utils |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 self._battor.RecordClockSyncMarker(sync_id) | 103 self._battor.RecordClockSyncMarker(sync_id) |
| 104 except battor_error.BattOrError: | 104 except battor_error.BattOrError: |
| 105 logging.critical( | 105 logging.critical( |
| 106 'Error while clock syncing with BattOr. Killing BattOr shell.') | 106 'Error while clock syncing with BattOr. Killing BattOr shell.') |
| 107 self._battor.KillBattOrShell() | 107 self._battor.KillBattOrShell() |
| 108 raise | 108 raise |
| 109 record_controller_clock_sync_marker_callback(sync_id, timestamp) | 109 record_controller_clock_sync_marker_callback(sync_id, timestamp) |
| 110 | 110 |
| 111 def CollectAgentTraceData(self, trace_data_builder, timeout=None): | 111 def CollectAgentTraceData(self, trace_data_builder, timeout=None): |
| 112 data = self._battor.CollectTraceData(timeout=timeout) | 112 data = self._battor.CollectTraceData(timeout=timeout) |
| 113 trace_data_builder.SetTraceFor(trace_data.BATTOR_TRACE_PART, data) | 113 trace_data_builder.AddTraceFor(trace_data.BATTOR_TRACE_PART, data) |
| OLD | NEW |