mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-21 06:45:24 -06:00
fix(api/device): remove extra timestamp margin for GPU process utilization
This commit is contained in:
parent
ec53de75b4
commit
e776dae3a3
1 changed files with 2 additions and 2 deletions
|
|
@ -1703,8 +1703,8 @@ class Device: # pylint: disable=too-many-instance-attributes,too-many-public-me
|
|||
self._timestamp,
|
||||
default=(),
|
||||
)
|
||||
self._timestamp = max(min((s.timeStamp for s in samples), default=0) - 2_000_000, 0)
|
||||
for s in samples:
|
||||
self._timestamp = min((s.timeStamp for s in samples), default=self._timestamp)
|
||||
for s in sorted(samples, key=lambda s: s.timeStamp):
|
||||
try:
|
||||
processes[s.pid].set_gpu_utilization(s.smUtil, s.memUtil, s.encUtil, s.decUtil)
|
||||
except KeyError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue