Releases: ancestor-mithril/timed-decorator
Releases · ancestor-mithril/timed-decorator
1.7.1
What's Changed
- Added
apply_timed_decoratorfor applying timing decorators to arbitrary functions without changing source code. - Supports default
timeddecorator and registered named decorators viacreate_timed_decorator. - Named decorators are lazily resolved, consistent with
get_timed_decorator. - Updated tests.
- Fixed new flake8 errors.
Full Changelog: 1.6.1...1.7.1
1.6.1
What's Changed
- Returning seconds instead of nanoseconds when
return_time=Trueanduse_seconds=True.
Full Changelog: 1.6.0...1.6.1
1.6.0
What's Changed
- Timed decorator can now operate with function objects.
- Time decorator now works even if the
__name__or__qualname__attribute is missing for the timed Callable. - Fixed test for timing cuda tensors
Full Changelog: 1.5.2...1.6.0
1.5.2
What's Changed
- Timed decorator can now operate with torch.jit.ScriptFunctions in #7.
Full Changelog: 1.5.1...1.5.2
1.5.1
1.5.0
What's Changed
- Changing behavior of
outparameter by in #5.- Previous behavior: if
outis passed to the decorator, the elapsed time is stored in thedictusing the fully qualified name as key. - New behavior: if
outis passed to the decorator, the number of function calls, the elapsed time and the "own time" is stored using the fully qualified name as key.
- Previous behavior: if
Full Changelog: 1.4.0...1.5.0
1.4.0
What's Changed
New parameter for using the fully qualified name of the function
- The fully qualified name of the function (
__qualname__) is used for logging whenuse_qualnameis enabled. - The
outparameter now uses the function's fully qualified name as key.
Added new facility for registering timed decorators and using the same decorator throughout the codebase
- This allows creating a complicated timer which is also able to accumulate elapsed times from all the measured functions. It can be easily manipulated to create code statistics.
Full Changelog: 1.3.0...1.4.0
1.3.0
What's Changed
Diversified measuring and printing options.
- Changed behavior when printing elapsed time
- Previous behavior: elapsed time is either printed to stdout, written to file or to logger.
- Current behavior: printing, logging and writing are not mutually exclusive anymore. Each is controlled by its own parameter.
- Added new parameter for returning elapsed time in addition to the function's return value.
- Updated classifiers in pyproject.toml.
- Improved test speed.
Full Changelog: 1.2.2...1.3.0
1.2.2
What's Changed
- Added option to write execution time to a dict.
- Added option to disable garbage collection during function execution.
Full Changelog: 1.2.0...1.2.2
1.2.0
Added new logging options.
Measurements can be logged to a file or to a logger using the python logging facilities.
Full Changelog: 1.1.1...1.2.0