Timed-decorator

Latest version: v1.6.0

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

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**: https://github.com/ancestor-mithril/timed-decorator/compare/1.5.2...1.6.0

1.5.2

What's Changed
* Timed decorator can now operate with torch.jit.ScriptFunctions in https://github.com/ancestor-mithril/timed-decorator/pull/7.


**Full Changelog**: https://github.com/ancestor-mithril/timed-decorator/compare/1.5.1...1.5.2

1.5.1

What's Changed
* Added parameter to disable created decorator in https://github.com/ancestor-mithril/timed-decorator/pull/6.


**Full Changelog**: https://github.com/ancestor-mithril/timed-decorator/compare/1.5.0...1.5.1

1.5.0

What's Changed
* Changing behavior of `out` parameter by in https://github.com/ancestor-mithril/timed-decorator/pull/5.
* Previous behavior: if `out` is passed to the decorator, the elapsed time is stored in the `dict` using the fully qualified name as key.
* New behavior: if `out` is 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.


**Full Changelog**: https://github.com/ancestor-mithril/timed-decorator/compare/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 when `use_qualname` is enabled.
* The `out` parameter 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**: https://github.com/ancestor-mithril/timed-decorator/compare/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**: https://github.com/ancestor-mithril/timed-decorator/compare/1.2.2...1.3.0

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.