Skip to content

basic_bot.commons.fps_stats

FpsStats Objects

class FpsStats()

FpsStats - A class to track overall and floating frames per seconds. Floating fps is calculated over the last 60 seconds.

Instantiate the class to start tracking the stats. Call increment() for each frame read. Call stats() to get the stats.

increment

def increment() -> None

Increment the frame count and calculate the floating fps

stats

def stats() -> dict[str, float]

Return the stats as a dictionary