pmonitor 1.1.6__tar.gz → 1.1.7__tar.gz
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.
- {pmonitor-1.1.6 → pmonitor-1.1.7}/PKG-INFO +1 -1
- {pmonitor-1.1.6 → pmonitor-1.1.7}/monitor/monitor_pids.py +3 -3
- {pmonitor-1.1.6 → pmonitor-1.1.7}/pmonitor.egg-info/PKG-INFO +1 -1
- {pmonitor-1.1.6 → pmonitor-1.1.7}/setup.py +1 -1
- {pmonitor-1.1.6 → pmonitor-1.1.7}/README.md +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/monitor/WinPidUtil.py +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/monitor/__init__.py +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/monitor/get_process_name.py +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/monitor/monitor_mac.py +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/monitor/monitor_win.py +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/monitor/run_monitor.py +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/monitor/sys_info.py +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/pmonitor.egg-info/SOURCES.txt +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/pmonitor.egg-info/dependency_links.txt +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/pmonitor.egg-info/entry_points.txt +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/pmonitor.egg-info/top_level.txt +0 -0
- {pmonitor-1.1.6 → pmonitor-1.1.7}/setup.cfg +0 -0
|
@@ -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) /
|
|
146
|
+
pid].ReadTransferCount) / self.interval
|
|
147
147
|
write_bytes_sec = (io_counters.WriteTransferCount - process_io_counters_pre[
|
|
148
|
-
pid].WriteTransferCount) /
|
|
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,
|
|
186
|
+
time.sleep(max(0, self.interval - elapsed))
|
|
187
187
|
|
|
188
188
|
async def start_perf(self):
|
|
189
189
|
if platform.system() == 'Windows':
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|