Skip to content

Commit

Permalink
Improve lagging message description (#24208)
Browse files Browse the repository at this point in the history
* Improve lag prints process name

* Cleanup

* small change

* Add bridge process name

* Use getproctitle

* Remaining
  • Loading branch information
gijskoning authored Apr 15, 2022
1 parent 1fa1c44 commit 0254a3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/realtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import gc
import os
import time
import multiprocessing
from typing import Optional

from setproctitle import getproctitle # pylint: disable=no-name-in-module

from common.clock import sec_since_boot # pylint: disable=no-name-in-module, import-error
from selfdrive.hardware import PC, TICI

Expand Down Expand Up @@ -56,7 +57,7 @@ def __init__(self, rate: int, print_delay_threshold: Optional[float] = 0.0) -> N
self._print_delay_threshold = print_delay_threshold
self._frame = 0
self._remaining = 0.0
self._process_name = multiprocessing.current_process().name
self._process_name = getproctitle()

@property
def frame(self) -> int:
Expand Down

0 comments on commit 0254a3f

Please sign in to comment.