mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-22 08:43:58 +08:00
Make pylint more strict (#1626)
* make pylint more strict * cleanup in progress * done cleaning up * no opendbc
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# type: ignore
|
||||
import psutil
|
||||
import time
|
||||
import os
|
||||
import sys
|
||||
import numpy as np
|
||||
import argparse
|
||||
import re
|
||||
from collections import defaultdict
|
||||
|
||||
'''
|
||||
System tools like top/htop can only show current cpu usage values, so I write this script to do statistics jobs.
|
||||
Features:
|
||||
@@ -24,18 +15,28 @@ System tools like top/htop can only show current cpu usage values, so I write th
|
||||
boardd: 1.96%, min: 1.96%, max: 1.96%, acc: 1.96%
|
||||
ubloxd.py: 0.39%, min: 0.39%, max: 0.39%, acc: 0.39%
|
||||
'''
|
||||
import psutil
|
||||
import time
|
||||
import os
|
||||
import sys
|
||||
import numpy as np
|
||||
import argparse
|
||||
import re
|
||||
from collections import defaultdict
|
||||
|
||||
|
||||
# Do statistics every 5 seconds
|
||||
PRINT_INTERVAL = 5
|
||||
SLEEP_INTERVAL = 0.2
|
||||
|
||||
monitored_proc_names = [
|
||||
'ubloxd', 'thermald', 'uploader', 'deleter', 'controlsd', 'plannerd', 'radard', 'mapd', 'loggerd' , 'logmessaged', 'tombstoned',
|
||||
'logcatd', 'proclogd', 'boardd', 'pandad', './ui', 'ui', 'calibrationd', 'params_learner', 'modeld', 'dmonitoringmodeld', 'camerad', 'sensord', 'updated', 'gpsd', 'athena']
|
||||
'ubloxd', 'thermald', 'uploader', 'deleter', 'controlsd', 'plannerd', 'radard', 'mapd', 'loggerd', 'logmessaged', 'tombstoned',
|
||||
'logcatd', 'proclogd', 'boardd', 'pandad', './ui', 'ui', 'calibrationd', 'params_learner', 'modeld', 'dmonitoringmodeld', 'camerad', 'sensord', 'updated', 'gpsd', 'athena']
|
||||
cpu_time_names = ['user', 'system', 'children_user', 'children_system']
|
||||
|
||||
timer = getattr(time, 'monotonic', time.time)
|
||||
|
||||
|
||||
def get_arg_parser():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Unlogger and UI",
|
||||
|
||||
@@ -32,7 +32,7 @@ except Exception:
|
||||
sys.exit(-1)
|
||||
|
||||
sensord_env = {**os.environ, 'SENSOR_TEST': '1'}
|
||||
process = subprocess.run("./sensord", cwd="/data/openpilot/selfdrive/sensord", env=sensord_env)
|
||||
process = subprocess.run("./sensord", cwd="/data/openpilot/selfdrive/sensord", env=sensord_env) # pylint: disable=subprocess-run-check
|
||||
|
||||
if process.returncode == 40:
|
||||
text = "Current run: SUCCESS\n"
|
||||
|
||||
Reference in New Issue
Block a user