From 7a3e454d274af3fd50b484c6eacc8c771418eed7 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 20 May 2024 22:39:25 -0700 Subject: [PATCH] move sentry/stats to system/ (#32490) * move sentry/stats to system/ * fix old-commit-hash: da6fd751257bcd3aa087ac4114e9f1529f7d3d12 --- release/files_common | 7 ++++--- selfdrive/manager/manager.py | 2 +- selfdrive/manager/process.py | 2 +- selfdrive/manager/process_config.py | 4 ++-- selfdrive/modeld/modeld.py | 2 +- selfdrive/test/test_onroad.py | 4 ++-- selfdrive/thermald/power_monitoring.py | 2 +- selfdrive/thermald/thermald.py | 2 +- {selfdrive => system}/sentry.py | 0 {selfdrive => system}/statsd.py | 0 {selfdrive => system}/tombstoned.py | 2 +- 11 files changed, 14 insertions(+), 13 deletions(-) rename {selfdrive => system}/sentry.py (100%) rename {selfdrive => system}/statsd.py (100%) rename {selfdrive => system}/tombstoned.py (99%) diff --git a/release/files_common b/release/files_common index 7dfccceb82..19a93bc7da 100644 --- a/release/files_common +++ b/release/files_common @@ -53,9 +53,6 @@ tools/replay/*.cc tools/replay/*.h selfdrive/__init__.py -selfdrive/sentry.py -selfdrive/tombstoned.py -selfdrive/statsd.py selfdrive/updated/** @@ -162,6 +159,10 @@ selfdrive/controls/lib/longitudinal_mpc_lib/* system/__init__.py system/*.py +system/sentry.py +system/tombstoned.py +system/statsd.py + system/hardware/__init__.py system/hardware/base.h system/hardware/base.py diff --git a/selfdrive/manager/manager.py b/selfdrive/manager/manager.py index 33c9ce9f5b..408314d62f 100755 --- a/selfdrive/manager/manager.py +++ b/selfdrive/manager/manager.py @@ -7,7 +7,7 @@ import traceback from cereal import log import cereal.messaging as messaging -import openpilot.selfdrive.sentry as sentry +import openpilot.system.sentry as sentry from openpilot.common.params import Params, ParamKeyType from openpilot.common.text_window import TextWindow from openpilot.system.hardware import HARDWARE, PC diff --git a/selfdrive/manager/process.py b/selfdrive/manager/process.py index 7964f5229d..36f299ae62 100644 --- a/selfdrive/manager/process.py +++ b/selfdrive/manager/process.py @@ -12,7 +12,7 @@ from setproctitle import setproctitle from cereal import car, log import cereal.messaging as messaging -import openpilot.selfdrive.sentry as sentry +import openpilot.system.sentry as sentry from openpilot.common.basedir import BASEDIR from openpilot.common.params import Params from openpilot.common.swaglog import cloudlog diff --git a/selfdrive/manager/process_config.py b/selfdrive/manager/process_config.py index 5a501c2160..5ea4b81b80 100644 --- a/selfdrive/manager/process_config.py +++ b/selfdrive/manager/process_config.py @@ -76,10 +76,10 @@ procs = [ PythonProcess("plannerd", "selfdrive.controls.plannerd", only_onroad), PythonProcess("radard", "selfdrive.controls.radard", only_onroad), PythonProcess("thermald", "selfdrive.thermald.thermald", always_run), - PythonProcess("tombstoned", "selfdrive.tombstoned", always_run, enabled=not PC), + PythonProcess("tombstoned", "system.tombstoned", always_run, enabled=not PC), PythonProcess("updated", "selfdrive.updated.updated", only_offroad, enabled=not PC), PythonProcess("uploader", "system.loggerd.uploader", always_run), - PythonProcess("statsd", "selfdrive.statsd", always_run), + PythonProcess("statsd", "system.statsd", always_run), # debug procs NativeProcess("bridge", "cereal/messaging", ["./bridge"], notcar), diff --git a/selfdrive/modeld/modeld.py b/selfdrive/modeld/modeld.py index 66563a3c1c..526fd4d218 100755 --- a/selfdrive/modeld/modeld.py +++ b/selfdrive/modeld/modeld.py @@ -15,7 +15,7 @@ from openpilot.common.filter_simple import FirstOrderFilter from openpilot.common.realtime import config_realtime_process from openpilot.common.transformations.camera import DEVICE_CAMERAS from openpilot.common.transformations.model import get_warp_matrix -from openpilot.selfdrive import sentry +from openpilot.system import sentry from openpilot.selfdrive.car.car_helpers import get_demo_car_params from openpilot.selfdrive.controls.lib.desire_helper import DesireHelper from openpilot.selfdrive.modeld.runners import ModelRunner, Runtime diff --git a/selfdrive/test/test_onroad.py b/selfdrive/test/test_onroad.py index 9aca9afcd9..53db737fc1 100755 --- a/selfdrive/test/test_onroad.py +++ b/selfdrive/test/test_onroad.py @@ -54,12 +54,12 @@ PROCS = { "selfdrive.monitoring.dmonitoringd": 4.0, "./proclogd": 1.54, "system.logmessaged": 0.2, - "selfdrive.tombstoned": 0, + "system.tombstoned": 0, "./logcatd": 0, "system.micd": 6.0, "system.timed": 0, "selfdrive.boardd.pandad": 0, - "selfdrive.statsd": 0.4, + "system.statsd": 0.4, "selfdrive.navd.navd": 0.4, "system.loggerd.uploader": (0.5, 15.0), "system.loggerd.deleter": 0.1, diff --git a/selfdrive/thermald/power_monitoring.py b/selfdrive/thermald/power_monitoring.py index 073589edb7..5a94625b48 100644 --- a/selfdrive/thermald/power_monitoring.py +++ b/selfdrive/thermald/power_monitoring.py @@ -4,7 +4,7 @@ import threading from openpilot.common.params import Params from openpilot.system.hardware import HARDWARE from openpilot.common.swaglog import cloudlog -from openpilot.selfdrive.statsd import statlog +from openpilot.system.statsd import statlog CAR_VOLTAGE_LOW_PASS_K = 0.011 # LPF gain for 45s tau (dt/tau / (dt/tau + 1)) diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index f5fc949637..d44ce6c18d 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -19,7 +19,7 @@ from openpilot.common.realtime import DT_TRML from openpilot.selfdrive.controls.lib.alertmanager import set_offroad_alert from openpilot.system.hardware import HARDWARE, TICI, AGNOS from openpilot.system.loggerd.config import get_available_percent -from openpilot.selfdrive.statsd import statlog +from openpilot.system.statsd import statlog from openpilot.common.swaglog import cloudlog from openpilot.selfdrive.thermald.power_monitoring import PowerMonitoring from openpilot.selfdrive.thermald.fan_controller import TiciFanController diff --git a/selfdrive/sentry.py b/system/sentry.py similarity index 100% rename from selfdrive/sentry.py rename to system/sentry.py diff --git a/selfdrive/statsd.py b/system/statsd.py similarity index 100% rename from selfdrive/statsd.py rename to system/statsd.py diff --git a/selfdrive/tombstoned.py b/system/tombstoned.py similarity index 99% rename from selfdrive/tombstoned.py rename to system/tombstoned.py index 2c99c7eafe..5bcced2666 100755 --- a/selfdrive/tombstoned.py +++ b/system/tombstoned.py @@ -9,7 +9,7 @@ import time import glob from typing import NoReturn -import openpilot.selfdrive.sentry as sentry +import openpilot.system.sentry as sentry from openpilot.system.hardware.hw import Paths from openpilot.common.swaglog import cloudlog from openpilot.system.version import get_build_metadata