nip.timing

nip.timing#

Code for timing various things, to test performance.

To create a new timeable action, either subclass Timeable and implement the run method, or use the register_timeable decorator to register a callable as a timeable.

To time a timeable, use the time_timeable function. To time all timeables, use the time_all_timeables function.

Examples

Create a new timeable and time it: >>> from nip.timing import Timeable, register_timeable, time_timeable >>> @register_timeable(name=”my_timeable”) >>> class MyTimeable(Timeable): … def __init__(self): … pass … def run(self, profiler): … pass >>> time_timeable(“my_timeable”)

Modules

models

Timeables to check model inference performance.

run

Timeables to check performance of a complete run.

timeables

Utilities for creating, registering, and timing timeable actions.