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