pmonitor 1.2.0__py3-none-any.whl → 1.2.1__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
@@ -21,12 +21,12 @@ class PidsPerf:
21
21
 
22
22
  def get_mac_perf(self):
23
23
  current_pid = self.processUtil.find_main_process_pid(self.process_name)
24
- dll_path = os.path.join(os.path.dirname(__file__), 'exec', 'GpuMonitor')
25
- if os.path.exists(dll_path):
26
- if not os.access(dll_path, os.X_OK):
24
+ gpu_tool = os.path.join(os.path.dirname(__file__), 'exec', 'GpuMonitor')
25
+ if os.path.exists(gpu_tool):
26
+ if not os.access(gpu_tool, os.X_OK):
27
27
  try:
28
- current_permissions = os.stat(dll_path).st_mode
29
- os.chmod(dll_path, current_permissions | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
28
+ current_permissions = os.stat(gpu_tool).st_mode
29
+ os.chmod(gpu_tool, current_permissions | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
30
30
  except Exception as e:
31
31
  raise e
32
32
  while True:
@@ -42,7 +42,7 @@ class PidsPerf:
42
42
  current_pids.add(current_pid) # 将主进程及子进程添加到list中
43
43
  pids_process = self.processUtil.get_pids_process(current_pids) # 获取所有进程
44
44
 
45
- result = subprocess.run([self.gpu_tool], stdout=subprocess.PIPE, text=True)
45
+ result = subprocess.run([gpu_tool], stdout=subprocess.PIPE, text=True)
46
46
  for line in result.stdout.split('\n'):
47
47
  pattern = r"GPU Name:(.*?),Device Percent:(.*?),Dedicated Usage:(\d+)"
48
48
  matches = re.findall(pattern, line)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pmonitor
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: pc monitor
5
5
  Home-page: UNKNOWN
6
6
  Author: cfr
@@ -2,7 +2,7 @@ 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=AYeIsaCp1LLKTI-Z4psP-o1Ol8xatY0K7wuvRFOsATI,15636
5
+ monitor/monitor_pids.py,sha256=lyqwT3t7a15H0uuAZs8qx0tQGoP-yqiquCAWNgJvamA,15631
6
6
  monitor/monitor_win.py,sha256=xs5nzqqEPoDmJTegh3lQhVjjpPcOWnruWKK65ttqnTo,6161
7
7
  monitor/run_monitor.py,sha256=s9JSFu5olh3VhrEqj_CZ5l25nvBtd2cN0NhU9R2KOKM,1581
8
8
  monitor/sys_info.py,sha256=aNultuRoQuRYPkYo397xAXVDXP07Qx5JOHtYzNmEvuc,3208
@@ -24,8 +24,8 @@ monitor/DLL/vcruntime140.dll,sha256=AsaqDm5iRBGp8ZsDYKeGWrFZCOJgJFEOXDipwINiw1o,
24
24
  monitor/DLL/vcruntime140_1.dll,sha256=fdmqAuJxxoym1fGNZR0joV1yWXFa9DMmV4993ifzdjc,49640
25
25
  monitor/exec/GpuMonitor,sha256=vlkPrbj2ArTAO_OTxrk68l3UDMigUM-eG7y76Tmmd0k,111568
26
26
  monitor/exec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- pmonitor-1.2.0.dist-info/METADATA,sha256=ade--dYTc2kF8Vrjhh3PKhEPQaR4GjRx-V9WZco1kBs,215
28
- pmonitor-1.2.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
29
- pmonitor-1.2.0.dist-info/entry_points.txt,sha256=vmlLEANgf2fZar9BeXYiKdF6GMJbVXip-SIZx5yPXDo,55
30
- pmonitor-1.2.0.dist-info/top_level.txt,sha256=tGkQDkVeyKgP5Rr7acpp0df83NBAnI8up0sGwRxuuQ4,8
31
- pmonitor-1.2.0.dist-info/RECORD,,
27
+ pmonitor-1.2.1.dist-info/METADATA,sha256=eHvEFcnTLdL17cbQm3ulGR0M4-YIFYTmKnk2hA3m4cY,215
28
+ pmonitor-1.2.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
29
+ pmonitor-1.2.1.dist-info/entry_points.txt,sha256=vmlLEANgf2fZar9BeXYiKdF6GMJbVXip-SIZx5yPXDo,55
30
+ pmonitor-1.2.1.dist-info/top_level.txt,sha256=tGkQDkVeyKgP5Rr7acpp0df83NBAnI8up0sGwRxuuQ4,8
31
+ pmonitor-1.2.1.dist-info/RECORD,,