Performance Information#

arcade.PerfGraph#

class arcade.PerfGraph(width, height, graph_data: str = 'FPS', update_rate: float = 0.1, background_color=(0, 0, 0), data_line_color=(255, 255, 255), axis_color=(155, 135, 12), grid_color=(155, 135, 12), font_color=(255, 255, 255), font_size=10)[source]#

Create a graph showing performance statistics.

update_graph(delta_time: float)[source]#

Update the graph.

arcade.clear_timings#

arcade.clear_timings()[source]#

Clear the dispatch event timing table created after arcade.enable_timings() is called.

arcade.disable_timings#

arcade.disable_timings()[source]#

Turn off the collection of timing information started by arcade.enable_timings().

arcade.enable_timings#

arcade.enable_timings(max_history: int = 100)[source]#

Enable the saving of performance information.

arcade.get_fps#

arcade.get_fps(frame_count: int = 60) float[source]#

Get the current FPS. arcade.enable_timings() must be called before getting the FPS.

Parameters

frame_count (int) – How many frames to look at to get FPS. So 30, would give you average FPS over the last 30 frames.

arcade.get_timings#

arcade.get_timings() Dict[source]#

Get a table with the dispatch event timings.

arcade.print_timings#

arcade.print_timings()[source]#

This prints to stdout a table of the most recent dispatched events and their average time.

The table looks something like:

Event          Count Average Time
-------------- ----- ------------
update            60       0.0553
on_update         60       0.0000
on_mouse_enter     1       0.0000
on_mouse_motion   39       0.0000
on_expose          1       0.0000
on_draw           60       0.0020

arcade.timings_enabled#

arcade.timings_enabled()[source]#

Return true if timings are enabled, false otherwise. See arcade.enable_timings().