性能测试工具 pc 进程性能测试平台,支持多平台平台进程 cpu、memory、fps(仅支持 windowsOpenGL DirectX 引擎应用)、gpu、thread_num、handle_num 等指标的实时监控和可视化展示

范顿顿 · 2024年04月26日 · 最后由 范顿顿 回复于 2024年04月30日 · 4144 次阅读

项目地址:https://github.com/15525730080/pc_perf

pc_perf

pc 进程性能测试平台,支持 windows / mac / linux 平台普通进程、window 游戏 GUI 进程的
cpu、memory、fps(仅支持 windowsOpenGL DirectX 引擎应用)、gpu、thread_num、handle_num 等指标的实时监控和可视化展示

启动入口

方式一:
git clone https://github.com/15525730080/pc_perf.git
pip install -r requirements.txt
# 需要使用管理员权限启动才可以获取到 windows fps !!!
python pc_perf.py

方式二:
# 需要使用管理员权限启动才可以获取到 windows fps !!!
pip install pc-perf
python -m pc_perf

创建任务

image

任务列表

image

性能报表

image

开源

本项目归属:范博洲

使用需要关注开源协议
禁止申请软著、专利 本人已申请

共收到 13 条回复 时间 点赞

支持虚幻引擎和 unity 引擎吗

可否打包程 exe 安装包,办公电脑不让联网好麻烦

笔记本 AMD 显卡,是不是只有 NVIDIA 能用?
——————————————————————————————————————————————————————
C:\WINDOWS\system32>python C:\Users\1\Downloads\pc_perf-main\pc_perf-main\pc_perf.py
Traceback (most recent call last):
File "D:\Python3_8_6\lib\site-packages\pynvml\nvml.py", line 1791, in LoadNvmlLibrary
nvmlLib = CDLL(os.path.join(os.getenv("WINDIR", "C:/Windows"), "System32/nvml.dll"))
File "D:\Python3_8_6\lib\ctypes__init
.py", line 373, in __init_
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\WINDOWS\System32\nvml.dll' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Python3_8_6\lib\site-packages\pynvml\nvml.py", line 1795, in LoadNvmlLibrary
nvmlLib = CDLL(os.path.join(os.getenv("ProgramFiles", "C:/Program Files"), "NVIDIA Corporation/NVSMI/nvml.dll"))
File "D:\Python3_8_6\lib\ctypes__init
.py", line 373, in __init_
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Program Files\NVIDIA Corporation\NVSMI\nvml.dll' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\1\Downloads\pc_perf-main\pc_perf-main\core\pc_tools.py", line 16, in
pynvml.nvmlInit()
File "D:\Python3_8_6\lib\site-packages\pynvml\nvml.py", line 1770, in nvmlInit
nvmlInitWithFlags(0)
File "D:\Python3_8_6\lib\site-packages\pynvml\nvml.py", line 1753, in nvmlInitWithFlags
_LoadNvmlLibrary()
File "D:\Python3_8_6\lib\site-packages\pynvml\nvml.py", line 1800, in _LoadNvmlLibrary
_nvmlCheckReturn(NVML_ERROR_LIBRARY_NOT_FOUND)
File "D:\Python3_8_6\lib\site-packages\pynvml\nvml.py", line 833, in _nvmlCheckReturn
raise NVMLError(ret)
pynvml.nvml.NVMLError_LibraryNotFound: NVML Shared Library Not Found
2024-04-28 15:39:44,011 - log - INFO - 本设备 gpu 获取不适配
2024-04-28 15:39:44,468 - log - INFO - 工作空间 C:\WINDOWS\system32
2024-04-28 15:39:44,470 - log - INFO - db path C:\WINDOWS\system32\task.sqlite
2024-04-28 15:39:44,558 - log - INFO - current path C:\WINDOWS\system32
Traceback (most recent call last):
File "C:\Users\1\Downloads\pc_perf-main\pc_perf-main\pc_perf.py", line 20, in
from util import DataCollect
File "C:\Users\1\Downloads\pc_perf-main\pc_perf-main\util.py", line 8, in
class DataCollect(object):
File "C:\Users\1\Downloads\pc_perf-main\pc_perf-main\util.py", line 30, in DataCollect
def format_all_data_value(all_data: list[dict]):
TypeError: 'type' object is not subscriptable

A_tester 回复

支持

yeyu 回复

gpu 收集是针对 n 卡的 amd 不行

yeyu 回复

可以的

yeyu 回复

另外你的 typing 报错是因为你的 python 事 3.9 以下。后面我打包可执行文件吧用起来方便点

范顿顿 回复

感谢大佬

把我 vac 了咋整

dubda 回复

不会啊。我这里的实例不是用的 cs2 嘛。它只是监控不会侵入

有时间可以考虑下这个吗?
创建任务时
1、进程按名称排序(目前应该时按 PID,提供排序方式选择更好),同一个程序的多个 pid 在一起方便选择
2、能否提供系统的资源占用监测?
3、能否提供同一个程序的资源占用监测(目前按进程,有的程序会有很多进程)?

yeyu 回复

3 是很好的建议,我也考虑过这个问题,但是数据融合展示还是分开也是个问题

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册