Revert "Remove setproctitle (#32716)" (#33195)

* Revert "Remove `setproctitle` (#32716)"

This reverts commit 9020d1931f4cd72f8162e4402278bdf76e3746f2.

* uv lock

* old name
old-commit-hash: 29b58d4f2f
This commit is contained in:
Adeeb Shihadeh
2024-08-05 16:42:22 -07:00
committed by GitHub
parent df13b36638
commit fc469e5f80
9 changed files with 65 additions and 59 deletions

View File

@@ -3,7 +3,7 @@ import os
import time
import numpy as np
from multiprocessing import Process
from openpilot.common.threadname import setthreadname
from setproctitle import setproctitle
def waste(core):
os.sched_setaffinity(0, [core,])
@@ -16,7 +16,7 @@ def waste(core):
j = 0
while 1:
if (i % 100) == 0:
setthreadname("%3d: %8d" % (core, i))
setproctitle("%3d: %8d" % (core, i))
lt = time.monotonic()
print("%3d: %8d %f %.2f" % (core, i, lt-st, j))
st = lt