pytest-codspeed 5.0.1__tar.gz → 5.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_codspeed-5.0.1/src/pytest_codspeed.egg-info → pytest_codspeed-5.0.3}/PKG-INFO +1 -1
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/pyproject.toml +1 -1
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/__init__.py +2 -2
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/__init__.py +23 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/instrument-hooks/dist/core.c +11566 -11193
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/callgrind.h +37 -25
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/core.h +5 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/instrument_hooks_module.c +12 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3/src/pytest_codspeed.egg-info}/PKG-INFO +1 -1
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/LICENSE +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/README.md +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/setup.cfg +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/setup.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/config.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/__init__.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/analysis.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/compat.h +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/valgrind.h +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/zig.h +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/instrument-hooks/scripts/release.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/walltime.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/plugin.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/py.typed +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/utils.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed.egg-info/SOURCES.txt +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed.egg-info/dependency_links.txt +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed.egg-info/entry_points.txt +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed.egg-info/requires.txt +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed.egg-info/top_level.txt +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/tests/test_format_time.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/tests/test_pytest_plugin.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/tests/test_pytest_plugin_cpu_instrumentation.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/tests/test_pytest_plugin_walltime.py +0 -0
- {pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/tests/test_utils.py +0 -0
|
@@ -82,7 +82,7 @@ version = { attr = "pytest_codspeed.__version__" }
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
[tool.bumpver]
|
|
85
|
-
current_version = "5.0.
|
|
85
|
+
current_version = "5.0.3"
|
|
86
86
|
version_pattern = "MAJOR.MINOR.PATCH[-TAG[NUM]]"
|
|
87
87
|
commit_message = "Release v{new_version} 🚀"
|
|
88
88
|
tag_message = "Release v{new_version} 🚀"
|
{pytest_codspeed-5.0.1 → pytest_codspeed-5.0.3}/src/pytest_codspeed/instruments/hooks/__init__.py
RENAMED
|
@@ -50,6 +50,10 @@ class InstrumentHooks:
|
|
|
50
50
|
if SUPPORTS_PERF_TRAMPOLINE and not sys.is_stack_trampoline_active():
|
|
51
51
|
sys.activate_stack_trampoline("perf") # type: ignore
|
|
52
52
|
|
|
53
|
+
# Ignore libpython and python executable frames in callgrind so they
|
|
54
|
+
# don't obfuscate the flamegraph.
|
|
55
|
+
self._callgrind_skip_python_runtime()
|
|
56
|
+
|
|
53
57
|
def __del__(self):
|
|
54
58
|
# Don't manually deinit - let the capsule destructor handle it
|
|
55
59
|
pass
|
|
@@ -223,3 +227,22 @@ class InstrumentHooks:
|
|
|
223
227
|
self.set_environment_list(section, "config", config_items)
|
|
224
228
|
|
|
225
229
|
self.write_environment()
|
|
230
|
+
|
|
231
|
+
def _callgrind_skip_python_runtime(self) -> None:
|
|
232
|
+
"""Skip libpython and the python executable from callgrind measurement."""
|
|
233
|
+
ldlibrary = sysconfig.get_config_var("LDLIBRARY")
|
|
234
|
+
libdir = sysconfig.get_config_var("LIBDIR")
|
|
235
|
+
libpython = next(
|
|
236
|
+
(
|
|
237
|
+
p
|
|
238
|
+
for p in (
|
|
239
|
+
os.path.join(libdir, ldlibrary) if ldlibrary and libdir else None,
|
|
240
|
+
os.path.join(sys.prefix, "lib", ldlibrary) if ldlibrary else None,
|
|
241
|
+
)
|
|
242
|
+
if p and os.path.exists(p)
|
|
243
|
+
),
|
|
244
|
+
None,
|
|
245
|
+
)
|
|
246
|
+
if libpython:
|
|
247
|
+
self._module.callgrind_add_obj_skip(libpython.encode())
|
|
248
|
+
self._module.callgrind_add_obj_skip(sys.executable.encode())
|