Chromium Code Reviews| Index: infra/services/sysmon/android_device_metrics.py |
| diff --git a/infra/services/sysmon/android_device_metrics.py b/infra/services/sysmon/android_device_metrics.py |
| index 8616be068bb5d0a5f1a777074ecd6c4ff5d2851a..6990cc0c19b80fcd22e3b585f3dbf9c28a86b6c7 100644 |
| --- a/infra/services/sysmon/android_device_metrics.py |
| +++ b/infra/services/sysmon/android_device_metrics.py |
| @@ -5,6 +5,7 @@ |
| import json |
| import logging |
| import os |
| +import re |
| import socket |
| import time |
| @@ -23,6 +24,8 @@ ANDROID_DEVICE_FILE = os.path.join(os.path.expanduser('~'), |
| # Don't read a file older than this many seconds. |
| ANDROID_DEVICE_FILE_STALENESS_S = 120 |
| +PORT_PATH_RE = re.compile(r'\d+\/\d+') |
| + |
| cpu_temp = ts_mon.FloatMetric('dev/cpu/temperature', |
| description='device CPU temperature in deg C') |
| @@ -51,6 +54,11 @@ def get_device_statuses(device_file=ANDROID_DEVICE_FILE, now=None): |
| return |
| for device_name, device in devices.iteritems(): |
| + if PORT_PATH_RE.match(device_name): |
| + logging.warning('Found port path %s as device id. Skipping.', |
|
ghost stip (do not use)
2016/06/01 18:03:37
interesting. when would this come up instead of de
bpastene
2016/06/01 21:43:30
I imagine it happens when there's a protocol/usb f
|
| + device_name) |
| + continue |
| + |
| fields = {'device_id': device_name} |
| # Fields with special handling. |