Timeguardian

Latest version: v0.0.7

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

Scan your dependencies

0.0.7

**Full Changelog**: https://github.com/ceboaldin/TimeGuardian/compare/v0.0.6...v0.0.7

Refactor TimeGuardian Decorators for Async/Sync Function Support

This releases introduces significant improvements to the TimeGuardian package. It addresses previously identified issues related to handling asynchronous and synchronous functions and optimizes performance. Key changes include:

1. Separation of Concerns: Created distinct _async_wrapper and _sync_wrapper methods to handle asynchronous and synchronous function calls, respectively. This resolves the 'await outside async function' error and ensures compatibility with different types of function calls.

2. Code Duplication Reduction: Refactored common logic into shared methods to minimize code duplication. This makes the codebase more maintainable and easier to understand.

3. Performance Optimization: Adjusted the memory usage measurement process to minimize the performance impact, especially in high-frequency function calls.

4. Error Handling: Enhanced error handling in both asynchronous and synchronous contexts to ensure robustness and reliability of the decorators.

These changes enhance the functionality, reliability, and maintainability of the TimeGuardian package, making it better suited for a wider range of use cases in performance monitoring.

---

This commit also includes necessary updates to documentation and comments to reflect the changes and guide future contributors.

0.0.6

**Full Changelog**: https://github.com/ceboaldin/TimeGuardian/compare/v0.0.5...v0.0.6

What's New

Global Unit Customization: Users can now globally set their preferred units for time and memory measurements. This flexibility allows for more tailored and precise monitoring according to the user's needs.
Set time units to milliseconds (ms) or seconds (s).
Set memory units to bytes, kilobytes (KB), or megabytes (MB).

0.0.5

**Full Changelog**: https://github.com/ceboaldin/TimeGuardian/compare/v0.0.4...v0.0.5

Enhance TimeGuardian decorators with error handling and update tests
- Updated TimeGuardian's measure and monitor decorators in decorators.py to include try-except blocks for improved error handling. These blocks catch, log, and re-raise exceptions, enhancing the robustness and reliability of the decorators.

- Adjusted fixtures in conftest.py to align with the updated TimeGuardian decorator logic. This includes updates to the fast_function fixture to use the monitor decorator with an appropriate execution time threshold.

These changes collectively ensure consistent error handling across the application, while maintaining the integrity of the decorators' original functionalities and enhancing the test suite for better coverage and validation.

0.0.4

What's Changed
* Time and memory measurement functionality by ceboaldin in https://github.com/ceboaldin/TimeGuardian/pull/8
* Changed variable names in to elapsed and memory
* support for asyncio is added


**Full Changelog**: https://github.com/ceboaldin/TimeGuardian/compare/v0.0.2...v0.0.4

0.0.2

In this release, we've made significant improvements to our logging.

Key updates include:

Time Logging: We've added detailed time logging, which records the elapsed time for each function call. This will help us identify any performance bottlenecks and optimize our code accordingly.

Memory Usage Logging: Alongside time logging, we've also introduced memory usage logging. This records the amount of memory used by each function call, helping us to identify any memory-intensive operations and optimize them.

Conditional Logging: To avoid cluttering the logs, we've added conditions for both time and memory logging. Logs will only be recorded if the elapsed time or memory usage exceeds a specified limit.

Exception Handling: In the event of an exception, the elapsed time and memory usage up until the point of the exception will be logged. This will help us to understand the state of the system at the time of the error.

These enhancements will provide us with more detailed insights into our application's performance, helping us to continually improve and optimize our code.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.