# p.Stats : class documentation

Part of planes View In Hierarchy

    A Stats instance stores and computes several runtime statistics.

    Attributes:

    Stats.total_planes
        Total number of planes.

    Stats.total_pixels
        Total number of pixels allocated for all planes.

    Stats.unchanged_planes
        Number of planes whose bitmap did not change in the last run.

    Stats.render_skip
        Number of planes for which rendering has been skipped because they
        are outside the screen.

    Stats.blit_skip
        Number of planes for which blitting has been skipped because they
        are outside the screen.

    Stats.render_time
        Time of last call to Display.render().

    Stats.mean_render_time
        Mean of the time of the last 30 calls to Display.render().

    Stats.renders_per_second
        Given Stats.mean_render_time, how many renders could be carried out
        in one second in theory. Note that this is not the actual FPS, which
        is largely determined by the application deploying the planes module.

Method | __init__ | `Initialise.`
Method | update | `Actively update stats from the display instance given, and reset frame-to-frame counters.`
Method | log_render_time | `Set Stats.render_time to the time given, and register that time for computing the mean.`

def __init__(self):

    Initialise.

def update(self, display):

    Actively update stats from the display instance given, and reset frame-to-frame counters.

def log_render_time(self, render_time):

    Set Stats.render_time to the time given, and register that time for computing the mean.