Simple-profile

Latest version: v1.1.2

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

Scan your dependencies

1.1.2

Changelog:
- Handle recursive functions properly with a single log message per top-level call.
- Trigger garbage collection before measuring memory usage to get more accurate measurements.

1.1.1

Changelog:
- Fix time and memory unit conversion (invalid unit scales).
- Automatically select the most suitable units by default.
- Add a `enable_gc` argument to enable garbage collection during time measurements.
- Add a GitHub Actions workflow to validate the package build on every modification.

1.1.0

Changelog:
- Restructure the package to improve maintainability.
- Rename the default decorator back to `simple_profile()` to avoid conflicts.
- Change the default time unit to nanoseconds.
- Change the default memory unit to bytes.
- Add `precision`, `time_precision` and `memory_precision` arguments to set the precision of log values.
- Add `print_args` and `print_result` arguments to log the functions arguments and result.
- Add a `separator` argument to change the separator to use between log values.
- Rename `time_unit` and `memory_unit` arguments to `unit` when possible to improve readability.
- Document the package.

1.0.2

Changelog:
- Change the default time unit to milliseconds.
- Change the default memory unit to megabytes.

1.0.1

Changelog:
- Change the name of the default decorator to `profile()`.

1.0.0

Initial version of the package.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.