duck.utils.performance¶
Performance Utilities Module
Provides functions for measuring code performance, timing code execution, and optimizing operations.
Module Contents¶
Functions¶
A decorator that measures the execution time of a function. |
|
A decorator that measures the execution time of a function. |
|
Measures the time taken to run a function. |
|
Optimizes sorting by removing duplicates before sorting the list. |
API¶
- duck.utils.performance.async_exec_time(func)[source]¶
A decorator that measures the execution time of a function.
- Parameters:
func – The function to measure.
- Returns:
The wrapped asynchronous function that will time its execution.
- Return type:
function
- duck.utils.performance.exec_time(func)[source]¶
A decorator that measures the execution time of a function.
- Parameters:
func – The function to measure.
- Returns:
The wrapped function that will time its execution.
- Return type:
function