veeenu / hudhook

A videogame overlay framework written in Rust, supporting DirectX and OpenGL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add performance metrics

veeenu opened this issue · comments

It should be easy to add a performance metrics tracker for debugging purposes.

Things that should be tracked:

  • Duration of message processing step
  • Duration of Pipeline::prepare_render
  • Duration of Pipeline::render
  • Duration of client code frame generation
  • Frame-to-frame elapsed time

These metrics don't necessarily need a big object, they can be stored in a struct of floats and updated via exponentially-weighted moving average with a low coefficient like 0.1 which should stabilize after 100 frames.