diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 5cd4a2f..c835d05 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: shard: [1, 2, 3, 4] - mode: ["simulation", "walltime", "memory"] + mode: ["simulation"] # , "walltime", "memory" name: "Run ${{ matrix.mode }} benchmarks (Shard #${{ matrix.shard }})" runs-on: ${{ matrix.mode == 'walltime' && 'codspeed-macro' || 'ubuntu-24.04' }} @@ -42,6 +42,8 @@ jobs: with: mode: ${{ matrix.mode }} run: uv run pytest tests/benchmarks/ --codspeed --test-group=${{ matrix.shard }} --test-group-count=${{ env.SHARDS }} + cache-instruments: false + runner-version: latest all-checks: runs-on: ubuntu-latest diff --git a/src/pytest_codspeed/instruments/hooks/__init__.py b/src/pytest_codspeed/instruments/hooks/__init__.py index 230aae8..975e809 100644 --- a/src/pytest_codspeed/instruments/hooks/__init__.py +++ b/src/pytest_codspeed/instruments/hooks/__init__.py @@ -244,5 +244,9 @@ def _callgrind_skip_python_runtime(self) -> None: None, ) if libpython: + libpython = os.path.realpath(libpython) + print(f"Identified libpython for callgrind skipping: {libpython}") self._module.callgrind_add_obj_skip(libpython.encode()) - self._module.callgrind_add_obj_skip(sys.executable.encode()) + executable = os.path.realpath(sys.executable) + print(f"Skipping Python executable in callgrind: {executable}") + self._module.callgrind_add_obj_skip(executable.encode())