Jenkins tuneup (#28095)

* tuneup

* use service messages

* logmono

* not passive
pull/28097/head
Adeeb Shihadeh 2 years ago committed by GitHub
parent 48b427bd3d
commit d5a0a4b3e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      Jenkinsfile
  2. 10
      selfdrive/test/test_onroad.py
  3. 6
      system/hardware/tici/tests/test_power_draw.py

8
Jenkinsfile vendored

@ -185,7 +185,7 @@ pipeline {
} }
} }
stage('camerad-ar') { stage('camerad') {
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } } agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
steps { steps {
phone_steps("tici-ar0231", [ phone_steps("tici-ar0231", [
@ -193,12 +193,6 @@ pipeline {
["test camerad", "python system/camerad/test/test_camerad.py"], ["test camerad", "python system/camerad/test/test_camerad.py"],
["test exposure", "python system/camerad/test/test_exposure.py"], ["test exposure", "python system/camerad/test/test_exposure.py"],
]) ])
}
}
stage('camerad-ox') {
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
steps {
phone_steps("tici-ox03c10", [ phone_steps("tici-ox03c10", [
["build", "cd selfdrive/manager && ./build.py"], ["build", "cd selfdrive/manager && ./build.py"],
["test camerad", "python system/camerad/test/test_camerad.py"], ["test camerad", "python system/camerad/test/test_camerad.py"],

@ -2,6 +2,7 @@
import math import math
import json import json
import os import os
import shutil
import subprocess import subprocess
import time import time
import numpy as np import numpy as np
@ -53,7 +54,7 @@ PROCS = {
"selfdrive.boardd.pandad": 0, "selfdrive.boardd.pandad": 0,
"selfdrive.statsd": 0.4, "selfdrive.statsd": 0.4,
"selfdrive.navd.navd": 0.4, "selfdrive.navd.navd": 0.4,
"system.loggerd.uploader": 30.0, "system.loggerd.uploader": 4.0,
"system.loggerd.deleter": 0.1, "system.loggerd.deleter": 0.1,
"selfdrive.locationd.laikad": None, # TODO: laikad cpu usage is sporadic "selfdrive.locationd.laikad": None, # TODO: laikad cpu usage is sporadic
} }
@ -94,14 +95,17 @@ class TestOnroad(unittest.TestCase):
return return
# setup env # setup env
os.environ['PASSIVE'] = "0"
os.environ['REPLAY'] = "1" os.environ['REPLAY'] = "1"
os.environ['SKIP_FW_QUERY'] = "1" os.environ['SKIP_FW_QUERY'] = "1"
os.environ['FINGERPRINT'] = "TOYOTA COROLLA TSS2 2019" os.environ['FINGERPRINT'] = "TOYOTA COROLLA TSS2 2019"
os.environ['LOGPRINT'] = 'debug' os.environ['LOGPRINT'] = "debug"
params = Params() params = Params()
params.clear_all() params.clear_all()
set_params_enabled() set_params_enabled()
if os.path.exists(ROOT):
shutil.rmtree(ROOT)
# Make sure athena isn't running # Make sure athena isn't running
os.system("pkill -9 -f athena") os.system("pkill -9 -f athena")
@ -299,7 +303,7 @@ class TestOnroad(unittest.TestCase):
result += "----------------- Service Timings --------------\n" result += "----------------- Service Timings --------------\n"
result += "------------------------------------------------\n" result += "------------------------------------------------\n"
for s, (maxmin, rsd) in TIMINGS.items(): for s, (maxmin, rsd) in TIMINGS.items():
msgs = [m.logMonoTime for m in self.lr if m.which() == s] msgs = [m.logMonoTime for m in self.service_msgs[s]]
if not len(msgs): if not len(msgs):
raise Exception(f"missing {s}") raise Exception(f"missing {s}")

@ -16,11 +16,11 @@ class Proc:
name: str name: str
power: float power: float
rtol: float = 0.05 rtol: float = 0.05
atol: float = 0.1 atol: float = 0.12
warmup: float = 6. warmup: float = 6.
PROCS = [ PROCS = [
Proc('camerad', 2.15), Proc('camerad', 2.1),
Proc('modeld', 0.93, atol=0.2), Proc('modeld', 0.93, atol=0.2),
Proc('dmonitoringmodeld', 0.4), Proc('dmonitoringmodeld', 0.4),
Proc('encoderd', 0.23), Proc('encoderd', 0.23),
@ -60,7 +60,7 @@ class TestPowerDraw(unittest.TestCase):
manager_cleanup() manager_cleanup()
tab = [] tab = []
tab.append(['process', 'expected (W)', 'current (W)']) tab.append(['process', 'expected (W)', 'measured (W)'])
for proc in PROCS: for proc in PROCS:
cur = used[proc.name] cur = used[proc.name]
expected = proc.power expected = proc.power

Loading…
Cancel
Save