pmonitor 1.3.8__py3-none-any.whl → 1.4.0__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/mac_gpu.py CHANGED
@@ -1,5 +1,10 @@
1
- import objc
2
- import Foundation
1
+ import platform
2
+
3
+ try:
4
+ import objc
5
+ import Foundation
6
+ except:
7
+ pass
3
8
 
4
9
  IOKit = Foundation.NSBundle.bundleWithIdentifier_("com.apple.framework.IOKit")
5
10
 
@@ -31,21 +36,20 @@ def get_gpu_memory():
31
36
  gpu_info = accelerator_performance_statistics()
32
37
  use_gpu_memory = 0
33
38
  device_usage = 0
34
- print(f"gpu_info: {gpu_info['PerformanceStatistics']}")
39
+ # print(f"gpu_info: {gpu_info['PerformanceStatistics']}")
35
40
  for key, value in gpu_info["PerformanceStatistics"].items():
36
41
  if key == "In use system memory":
37
42
  use_gpu_memory = int(value) / 1024 / 1024
38
- print(f"{key}: {value}")
43
+ # print(f"{key}: {value}")
39
44
  elif key == "inUseSysMemoryBytes":
40
45
  use_gpu_memory = int(value) / 1024 / 1024
41
- print(f"{key}: {value}")
46
+ # print(f"{key}: {value}")
42
47
  elif key == "Device Utilization %":
43
48
  device_usage = int(value)
44
- print('device usage', device_usage)
49
+ # print('device usage', device_usage)
45
50
  # use_gpu_memory = gpu_info["PerformanceStatistics"]["In use system memory"]
46
51
  # total_gpu_memory = gpu_info["PerformanceStatistics"]["Alloc system memory"]
47
52
  except Exception as e:
48
53
  print(f"Mac端在arm64平台通过接口获取Gpu Memory失败:{e}")
49
54
  use_gpu_memory = 0
50
55
  return use_gpu_memory, device_usage
51
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pmonitor
3
- Version: 1.3.8
3
+ Version: 1.4.0
4
4
  Summary: pc monitor
5
5
  Home-page: UNKNOWN
6
6
  Author: cfr
@@ -1,7 +1,7 @@
1
1
  monitor/WinPidUtil.py,sha256=0vu2cqcQRrBTb5t_9HOmUoOfbe9KRrI-cyDlJX9bcrw,8753
2
2
  monitor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  monitor/get_process_name.py,sha256=HxePo2gdrTo2Ukg4DTnYzUMdczVWywCeLCXQ-RRWyu8,3913
4
- monitor/mac_gpu.py,sha256=fzKZEcyM4oFOLfC8VCZpNw6MZ3jP0hkIXFhFWRNQ96I,1836
4
+ monitor/mac_gpu.py,sha256=khw3FfyC8D-emeg898BxSOQaVzHS7gvHcnSTywsntIs,1890
5
5
  monitor/monitor_mac.py,sha256=OoptTTXTZQupzBwgGOfKNjyYAKBxDy-wI3l6T7XVE8s,4651
6
6
  monitor/monitor_pids.py,sha256=704fZlCW6Naf3ODxWLSFo29dSrRhplRP35Nv2sMXngQ,14569
7
7
  monitor/monitor_win.py,sha256=xs5nzqqEPoDmJTegh3lQhVjjpPcOWnruWKK65ttqnTo,6161
@@ -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.3.8.dist-info/METADATA,sha256=ZR9w3aCQaI4sWKLj6OZ4MTKNzIxGdAxwE0rXd6AQPgA,215
28
- pmonitor-1.3.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
29
- pmonitor-1.3.8.dist-info/entry_points.txt,sha256=vmlLEANgf2fZar9BeXYiKdF6GMJbVXip-SIZx5yPXDo,55
30
- pmonitor-1.3.8.dist-info/top_level.txt,sha256=tGkQDkVeyKgP5Rr7acpp0df83NBAnI8up0sGwRxuuQ4,8
31
- pmonitor-1.3.8.dist-info/RECORD,,
27
+ pmonitor-1.4.0.dist-info/METADATA,sha256=4ekDC9YXVKaNx5dlDm0qY14BJ4TdBmwYZGVPplB6JH0,215
28
+ pmonitor-1.4.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
29
+ pmonitor-1.4.0.dist-info/entry_points.txt,sha256=vmlLEANgf2fZar9BeXYiKdF6GMJbVXip-SIZx5yPXDo,55
30
+ pmonitor-1.4.0.dist-info/top_level.txt,sha256=tGkQDkVeyKgP5Rr7acpp0df83NBAnI8up0sGwRxuuQ4,8
31
+ pmonitor-1.4.0.dist-info/RECORD,,