Skip to content

Version 4.1.0

Compare
Choose a tag to compare
@Erotemic Erotemic released this 17 Aug 04:32
· 84 commits to main since this release
ecf9c5b

This new version contains big quality of life improvements.

Highlights

Documentation: We now have readthedocs documentation that covers usage tutorials and the API.

Explicit Decorator: There is now a global profile decorator. In your code import line_profiler and decorate functions with @line_profiler.profile. Your code runs as normal by default. Setting the environment variable LINE_PROFILE=1 will enable profiling. For details see the docs.

Auto-Profiling: Users can now run kernprof with -p <modname> to profile all functions in a module without explicitly decorating them. For details see the docs.

CHANGELOG

  • FIX: skipzeros now checks for zero hits instead of zero time
  • FIX: Fixed errors in Python 3.11 with duplicate functions.
  • FIX: show_text now increases column sizes or switches to scientific notation to maintain alignment
  • ENH: show_text now has new options: sort and summarize
  • ENH: Added new CLI arguments -srm to line_profiler to control sorting, rich printing, and summary printing.
  • ENH: New global profile function that can be enabled by --profile or LINE_PROFILE=1.
  • ENH: New auto-profile feature in kernprof that will profile all functions in specified modules.
  • ENH: Kernprof now outputs instructions on how to view results.
  • ENH: Added readthedocs integration: https://kernprof.readthedocs.io/en/latest/index.html

Thanks to @Erotemic @ta946 @Theelx @notEvil