Skip to content

Commit

Permalink
Bump version: v4.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick committed Aug 1, 2024
1 parent a24de44 commit 751d2bc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ Known issues
Changelog
---------

### v4.7.0

_1 August 2024_

- Adds a new, convenient API for [profiling chunks of Python code](https://pyinstrument.readthedocs.io/en/latest/guide.html#profile-a-specific-chunk-of-code)! You can now profile simply using a `with` block, or a function/method decorator. This will profile the code and print a short readout into the terminal. (#327)
- Adds new, lower overhead timing options. Pyinstrument calls timers on every Python function call, which is fine on systems with fast timing available, but it adds significant overhead on systems that require a syscall for each, such as some Docker environments. Pyinstrument will now detect slow timers present a warning with two choices. You can enable a 'timing thread', which offloads the timing workload from the profiled thread, or, if you're happy with lower resolution, you can opt to use a 'coarse' timer, which is provided on some Linux systems. (#273)
- Alt-click rows in the HTML output to collapse/expand the whole tree (#325)
- Adds a `flat` argument to the console output, to present a flat list of functions (#294)
- Adds a Litestar example config and docs (#284)
- Preliminary Python 3.13 support (#322)

### v4.6.2

_26 January 2024_
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = "Joe Rickerby"

# The full version, including alpha/beta/rc tags
release = "4.6.2"
release = "4.7.0"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pyinstrument/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pyinstrument.profiler import Profiler

__all__ = ["__version__", "Profiler", "load_ipython_extension", "profile"]
__version__ = "4.6.2"
__version__ = "4.7.0"

# enable deprecation warnings
warnings.filterwarnings("once", ".*", DeprecationWarning, r"pyinstrument\..*")
Expand Down
4 changes: 2 additions & 2 deletions pyinstrument/stack_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def _check_timing_overhead(self, interval: float, timer_type: TimerType):
return

if timer_type == "walltime":
if overhead > 200e-9:
if overhead > 300e-9:
self.has_warned_about_timing_overhead = True
message_parts: list[str] = []
message_parts.append(
Expand All @@ -237,7 +237,7 @@ def _check_timing_overhead(self, interval: float, timer_type: TimerType):
"""
)

if "walltime_coarse" in overheads and overheads["walltime_coarse"] < 200e-9:
if "walltime_coarse" in overheads and overheads["walltime_coarse"] < 300e-9:
coarse_resolution = walltime_coarse_resolution()
assert coarse_resolution is not None
message_parts.append(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
setup(
name="pyinstrument",
packages=find_namespace_packages(include=["pyinstrument*"]),
version="4.6.2",
version="4.7.0",
ext_modules=[
Extension(
"pyinstrument.low_level.stat_profile",
Expand Down

0 comments on commit 751d2bc

Please sign in to comment.