common.timing
Attributes
Functions
|
Timing decorator function to measure time spent on a function call. |
|
Write the MPI averaged timings to a text file. |
Module Contents
- common.timing.timed(timer: str | None | collections.abc.Callable[Ellipsis, Any] = None) collections.abc.Callable[Ellipsis, Any][source]
Timing decorator function to measure time spent on a function call.
Use it with
@timed def slow_function(): ...
where a dolfinx timer entry will be created with the function name and stored in the global list
_TIMER_REGISTRY. To set a timer name that differs from the function name:@timed("simple name") def _private_function_with_long_name(): ...