A preloadable library, able to dump the frame times of any OpenGL application on Linux, on any driver.
By default, the timing is written into /tmp/libframetime.out, but you can specify an alternate file with the LIBFRAMETIME_FILE env var.
To compile without EGL support (if you don’t have the EGL headers), add -DNO_EGL to your CFLAGS.
Linux (For example, Debian):
-
gcc (for base compiling)
-
mesa-common-dev (glx.h)
-
libegl1-mesa-dev (egl.h)
LD_PRELOAD=path/to/libframetime.so dota2
For Steam Users,choose launch options for a given title. Example:
LD_PRELOAD=path/to/libframetime.so %command%
Or with a custom output file:
LIBFRAMETIME_FILE=/tmp/dota2.frametime LD_PRELOAD=path/to/libframetime.so dota2
The accompanying awk script can be used to calculate the usual stats:
stats.awk < libframetime.out
Min/avg/max frametimes (us): 166 / 625.626 / 5955 Min/avg/max FPS: 167.926 / 1598.4 / 6024.1 50/90/95/99 percentiles (us): 410 / 434 / 589 / 5018