pmonitor 1.1.6__py3-none-any.whl → 1.1.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
monitor/monitor_pids.py CHANGED
@@ -143,9 +143,9 @@ class PidsPerf:
143
143
  memory_info = pidWinPerf.get_process_memory(pid)
144
144
  io_counters = pidWinPerf.get_io_counters(pid)
145
145
  read_bytes_sec = (io_counters.ReadTransferCount - process_io_counters_pre[
146
- pid].ReadTransferCount) / monitor_interval_seconds
146
+ pid].ReadTransferCount) / self.interval
147
147
  write_bytes_sec = (io_counters.WriteTransferCount - process_io_counters_pre[
148
- pid].WriteTransferCount) / monitor_interval_seconds
148
+ pid].WriteTransferCount) / self.interval
149
149
  if process_cpu_time_post:
150
150
  # 计算CPU使用率
151
151
  cpu_usage = round((process_cpu_time_post - process_cpu_times_pre[pid]) / (
@@ -183,7 +183,7 @@ class PidsPerf:
183
183
  system_time_pre = system_time_post
184
184
  # 等待以确保大约每秒更新一次
185
185
  elapsed = time.time() - start_time
186
- time.sleep(max(0, monitor_interval_seconds - elapsed))
186
+ time.sleep(max(0, self.interval - elapsed))
187
187
 
188
188
  async def start_perf(self):
189
189
  if platform.system() == 'Windows':
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pmonitor
3
- Version: 1.1.6
3
+ Version: 1.1.7
4
4
  Summary: pc monitor
5
5
  Home-page: UNKNOWN
6
6
  Author: cfr
@@ -2,12 +2,12 @@ monitor/WinPidUtil.py,sha256=NGkit8UoDAW7dz1vrwsb50QFroO-0hZ44fd_fykJ3WM,8523
2
2
  monitor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  monitor/get_process_name.py,sha256=eUElEd6chW-gw416o3VZg3UZPi8ZCG9rcw8ayrpVcz4,3620
4
4
  monitor/monitor_mac.py,sha256=OoptTTXTZQupzBwgGOfKNjyYAKBxDy-wI3l6T7XVE8s,4651
5
- monitor/monitor_pids.py,sha256=5KTqqwUtvaOi5BSu4W3bPHiGcqu4wj1Ry8xgmD2MnQY,10188
5
+ monitor/monitor_pids.py,sha256=Yzfd1WzkfKkz1POpOLpRmoJh5GJxXY8Goz1JMJd-XoQ,10155
6
6
  monitor/monitor_win.py,sha256=xs5nzqqEPoDmJTegh3lQhVjjpPcOWnruWKK65ttqnTo,6161
7
7
  monitor/run_monitor.py,sha256=5oUD_yuFkrKRO_-gGbs2IKuGd5lRqUEihRTeWihxOHk,2106
8
8
  monitor/sys_info.py,sha256=aNultuRoQuRYPkYo397xAXVDXP07Qx5JOHtYzNmEvuc,3208
9
- pmonitor-1.1.6.dist-info/METADATA,sha256=2dVZApFR6bYzfFpiwS3aoPl2FR0-L0FK1qGs-IW1Ko8,215
10
- pmonitor-1.1.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
11
- pmonitor-1.1.6.dist-info/entry_points.txt,sha256=vmlLEANgf2fZar9BeXYiKdF6GMJbVXip-SIZx5yPXDo,55
12
- pmonitor-1.1.6.dist-info/top_level.txt,sha256=tGkQDkVeyKgP5Rr7acpp0df83NBAnI8up0sGwRxuuQ4,8
13
- pmonitor-1.1.6.dist-info/RECORD,,
9
+ pmonitor-1.1.7.dist-info/METADATA,sha256=BHE-cmGq43jxWvIll4shrDPqOipuDtFpTk19ccVzN0k,215
10
+ pmonitor-1.1.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
11
+ pmonitor-1.1.7.dist-info/entry_points.txt,sha256=vmlLEANgf2fZar9BeXYiKdF6GMJbVXip-SIZx5yPXDo,55
12
+ pmonitor-1.1.7.dist-info/top_level.txt,sha256=tGkQDkVeyKgP5Rr7acpp0df83NBAnI8up0sGwRxuuQ4,8
13
+ pmonitor-1.1.7.dist-info/RECORD,,