Library to measure FPS and FlipRate
Project description
FPS Inspector SDK
Build status
Windows(AppVeyour):
It's a library which allows you to measure FPS FlipRate and other metrics.
It's based on Event Tracing and doesn't hook inside game process unlike Fraps
For now I've added only python binding if you wanna use another languages like C#, Java, R etc - let me know and I will add them
Also, you are able to use compiled dll and header from native code or add bindings by yourself
Installation
First option is:
git clone https://github.com/Andrey1994/fps_inspector_sdk
cd python
pip install .
Also you can install it from PYPI:
pip install fps_inspector_sdk
you have to run it with administrator priviligies and using 64-bit Python
Simple Sample:
import sys
import time
import matplotlib
matplotlib.use ('Agg')
import numpy
import matplotlib.pyplot as plt
from fps_inspector_sdk import fps_inspector
def main ():
float_formatter = lambda x: "%.5f" % x
numpy.set_printoptions (formatter={'float_kind': float_formatter}, threshold=numpy.inf)
pid = int (sys.argv[1])
fps_inspector.start_fliprate_recording (pid)
time.sleep (10)
fps_inspector.stop_fliprate_recording ()
data = fps_inspector.get_all_fliprates () # get all data from begining,
# also you can obtain the latest data using fps_inspector.get_last_fliprates(num_samples) method
# data is a pandas dataframe, it simplify data analysis!
print (data)
plt.figure ()
data[data.ScreenTime != 0][['FPS', 'FlipRate', 'ScreenTime']].plot (x='ScreenTime', subplots=True)
plt.savefig ('plot.png')
data.to_csv('scores.csv')
plt.close ()
if __name__ == "__main__":
main ()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file fps_inspector_sdk-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: fps_inspector_sdk-1.0.8-py3-none-any.whl
- Upload date:
- Size: 266.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 352b7017282319346540b54c1992afc738ecee87e3e092a7964e42f5112fcaad |
|
MD5 | af6618956346bb69d77d09e32fa6448f |
|
BLAKE2b-256 | 94cca2b7d7645b94d355c590f2a36fcd2c15e7830b4859bdf195aff1f05399bc |