Git Product home page Git Product logo

hoodedunicorn / python-fps-monitor Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 80 KB

This program uses Pygame to create a window displaying FPS, CPU usage, and GPU usage in real-time. It uses the psutil and gpustat modules to gather data about system performance. Users can adjust the window size and font size. The window updates every second and can be closed by pressing the 'X' button.

License: MIT License

Python 100.00%
pygame python fps-counter cpu-monitor gpu-monitor system-monitor

python-fps-monitor's Introduction

GitHub release (latest SemVer) npm (scoped) npm

Python FPS and System Monitor ๐ŸŽฎ

This is a Python script that uses the Pygame library to display the current FPS (frames per second) and system information such as GPU usage and CPU usage in a resizable window.

Dependencies ๐Ÿ“‘

  • Pygame
  • Psutil
  • sys

Installation ๐Ÿ’ป

Install via NPM packages ๐Ÿญ

  • Install the dependencies by running pip install pygame psutil in the command line.
  • Install package via NPM package manager npm i @hoodedunicorn/python-fps-monitor
  • Run the script using python FPS-Monitor.py

Limitations โš ๏ธ

This script is only compatible with NVidia GPUs. It will not work with other types of GPUs such as AMD or Intel. Additionally, it will only display information for the first GPU it detects. If you have multiple GPUs installed, you will need to modify the script to display information for all of them.

Features ๐Ÿ‘พ

This code is a Python script that uses Pygame, sys, psutil, gpustat, and cpuinfo libraries to display system information in a graphical interface. The code initializes the Pygame library, sets the height and width of the window, and sets up a font for text display.

The script has several functions that are responsible for getting specific system information and returning text in the form of a Pygame surface. The fpsrun() function returns the current FPS value as text.

The get_cpu_usage() function returns the CPU usage percentage, along with the CPU name, in text format with different colors depending on whether the CPU is from AMD, Intel, or any other brand.

The get_gpu_usage() and get_gpu_name() functions return the GPU usage percentage and name in text format with green color. The get_ram_info() and get_ram_usage() functions return the total RAM and the RAM usage percentage in text format with orange color.


In the main loop, the script listens for Pygame quit events, updates the screen with the system information, and updates the display 60 times per second. The script displays the FPS value, CPU name, CPU usage, GPU name, GPU usage, total RAM, and RAM usage on the screen.

Roadmap ๐Ÿ“† (subject to change)

โœ”๏ธ = Implemented โ™ป๏ธ = In testing ๐Ÿ“ = Working on it โŒ = Not yet available / Can't be implemente

Feature โœ”๏ธ/โ™ป๏ธ/๐Ÿ“/โŒ
RAM stats & usage โœ”๏ธ
CPU stats color AMD or Intel โŒ Scrapped in Testing - Too intensive, borked FPS
CPU temps and GPU Memory usage ๐Ÿ“
Accessible for all GPU's โŒ
Be an Overlay ๐Ÿ“

Conclusion ๐Ÿš€

This script is a useful tool for monitoring the performance of your system while running resource-intensive applications such as games or video editing software. It is easy to install and customize, making it a valuable addition to any developer or gamer's toolbox.

Versions ๐Ÿ•

To see versions click me,

to download a previous release click here

Bugs ๐Ÿ›

Issue Resolved?
Window is very slow to change position โœ”๏ธ 30/01/2023 EU
FPS is not shown correctly โœ”๏ธ 30/01/2023 EU

python-fps-monitor's People

Contributors

hoodedunicorn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.