pmonitor 1.4.3__py3-none-any.whl → 1.4.5__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
@@ -7,6 +7,7 @@ import asyncio
7
7
  import platform
8
8
  import ctypes
9
9
  import os
10
+ from PyLibreHardwareMonitor.computer import Computer
10
11
 
11
12
  if platform.system() != 'Windows':
12
13
  from monitor.mac_gpu import get_gpu_memory
@@ -103,7 +104,6 @@ class PidsPerf:
103
104
  def get_win_perf(self):
104
105
  from monitor.WinPidUtil import PidWinPerformance, FILETIME
105
106
  from ctypes import CDLL, c_int, c_char_p, byref
106
- from PyLibreHardwareMonitor.computer import Computer
107
107
  pidWinPerf = PidWinPerformance()
108
108
  system_time_pre = pidWinPerf.filetime_to_100nano_seconds(FILETIME())
109
109
  p_pid = self.processUtil.find_main_process_pid(self.process_name)
@@ -250,9 +250,14 @@ class PidsPerf:
250
250
  'gpu_System': round(minor_gpu_system_sum, 2),
251
251
  'gpu_Committed': round(minor_gpu_committed_sum, 2),
252
252
  'gpu_Usage': round(minor_gpu_percent_sum, 2)}
253
- gpu_data = {'gpu memory usage': small_data['GPU Memory Used'],
254
- 'gpu memory total': small_data['GPU Memory Total'],
255
- 'gpu memory free': small_data['GPU Memory Free']}
253
+ if 'GPU Memory Used' in small_data:
254
+ gpu_data = {'gpu memory usage': round(small_data['GPU Memory Used'], 2),
255
+ 'gpu memory total': round(small_data['GPU Memory Total'], 2),
256
+ 'gpu memory free': round(small_data['GPU Memory Free'], 2)}
257
+ else:
258
+ gpu_data = {'gpu memory usage': round(small_data['D3D Shared Memory Used'], 2),
259
+ 'gpu memory total': round(small_data['D3D Shared Memory Total'], 2),
260
+ 'gpu memory free': round(small_data['D3D Shared Memory Free'], 2)}
256
261
  try:
257
262
  data = {'main': main_data, 'other': other_data, 'disk': disk_data,
258
263
  'gpu': gpu_data,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pmonitor
3
- Version: 1.4.3
3
+ Version: 1.4.5
4
4
  Summary: pc monitor
5
5
  Home-page: UNKNOWN
6
6
  Author: cfr
@@ -8,6 +8,8 @@ Author-email: 1354592998@qq.com
8
8
  License: MIT
9
9
  Platform: all
10
10
  Requires-Python: >=3.6
11
+ Requires-Dist: PyLibreHardwareMonitor >=1.2.2
12
+ Requires-Dist: psutil >=5.9.8
11
13
 
12
14
  pc application get monitor
13
15
 
@@ -3,7 +3,7 @@ monitor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  monitor/get_process_name.py,sha256=HxePo2gdrTo2Ukg4DTnYzUMdczVWywCeLCXQ-RRWyu8,3913
4
4
  monitor/mac_gpu.py,sha256=kQDPMW04lIYPBbJw772Jh1OQxj-D4JNmdjJlP6BuR4w,2320
5
5
  monitor/monitor_mac.py,sha256=OoptTTXTZQupzBwgGOfKNjyYAKBxDy-wI3l6T7XVE8s,4651
6
- monitor/monitor_pids.py,sha256=yvUOIuwMw5stDxOVSY2vu72CzxZzmL6qCYsF9vw3VY8,15580
6
+ monitor/monitor_pids.py,sha256=DftMSexy87lHIiSJoVJDxNQLXcfHpZg4jNwsJRc4hjw,15968
7
7
  monitor/monitor_win.py,sha256=xs5nzqqEPoDmJTegh3lQhVjjpPcOWnruWKK65ttqnTo,6161
8
8
  monitor/run_monitor.py,sha256=s9JSFu5olh3VhrEqj_CZ5l25nvBtd2cN0NhU9R2KOKM,1581
9
9
  monitor/sys_info.py,sha256=aNultuRoQuRYPkYo397xAXVDXP07Qx5JOHtYzNmEvuc,3208
@@ -24,8 +24,8 @@ monitor/DLL/ucrtbased.dll,sha256=vtmKFPEHyr2OXkrUOu3Qs1dlbKG1dxZ8ItKCkTTU5S4,223
24
24
  monitor/DLL/vcruntime140.dll,sha256=AsaqDm5iRBGp8ZsDYKeGWrFZCOJgJFEOXDipwINiw1o,119888
25
25
  monitor/DLL/vcruntime140_1.dll,sha256=fdmqAuJxxoym1fGNZR0joV1yWXFa9DMmV4993ifzdjc,49640
26
26
  monitor/exec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- pmonitor-1.4.3.dist-info/METADATA,sha256=fqc-_49ex8Sv1XfkptmGPMP67m5BT0pt28YhTSV-fJI,215
28
- pmonitor-1.4.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
29
- pmonitor-1.4.3.dist-info/entry_points.txt,sha256=vmlLEANgf2fZar9BeXYiKdF6GMJbVXip-SIZx5yPXDo,55
30
- pmonitor-1.4.3.dist-info/top_level.txt,sha256=tGkQDkVeyKgP5Rr7acpp0df83NBAnI8up0sGwRxuuQ4,8
31
- pmonitor-1.4.3.dist-info/RECORD,,
27
+ pmonitor-1.4.5.dist-info/METADATA,sha256=UKe88ai-jAu5uTDtUv0cA4MBGidBlirSmRUdRIJ33Mk,291
28
+ pmonitor-1.4.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
29
+ pmonitor-1.4.5.dist-info/entry_points.txt,sha256=vmlLEANgf2fZar9BeXYiKdF6GMJbVXip-SIZx5yPXDo,55
30
+ pmonitor-1.4.5.dist-info/top_level.txt,sha256=tGkQDkVeyKgP5Rr7acpp0df83NBAnI8up0sGwRxuuQ4,8
31
+ pmonitor-1.4.5.dist-info/RECORD,,