Skip to content

Conversation

@not-matthias
Copy link
Member

@not-matthias not-matthias commented Jan 28, 2026

No description provided.

@not-matthias not-matthias force-pushed the cod-2105-support-memory-profiling-for-python branch from 55eeef1 to 4bd794f Compare January 28, 2026 17:51
@not-matthias not-matthias marked this pull request as ready for review January 28, 2026 17:51
@avalanche-staging
Copy link

avalanche-staging bot commented Jan 28, 2026

Congrats! CodSpeed is installed 🎉

🆕 330 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Open in CodSpeed

# Manually call the library function to avoid an extra stack frame. Also
# call the callgrind markers directly to avoid extra overhead.
self.instrument_hooks.lib.callgrind_start_instrumentation()
self.instrument_hooks.start_benchmark()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to the original comment here ?

Is the extra stack frame no longer an issue ?

finally:
# Ensure instrumentation is stopped even if the test failed
self.instrument_hooks.lib.callgrind_stop_instrumentation()
self.instrument_hooks.stop_benchmark()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda same remark here

f"callgraph: {'enabled' if SUPPORTS_PERF_TRAMPOLINE else 'not supported'}"
)
warnings = []
warns = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this renaming, is there any reason?

instrument_hooks: InstrumentHooks | None

def __init__(self, config: CodSpeedConfig) -> None:
def __init__(self, config: CodSpeedConfig, mode: MeasurementMode) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesnt this lead to some kind of linter error for unused argument ? Just curious

- name: Run benchmarks
uses: CodSpeedHQ/action@main
with:
runner-version: branch:cod-2105-support-memory-profiling-for-python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not forget to drop this commit

sudo apt-get install valgrind -y
uv sync --dev
sudo apt-get remove valgrind -y
- uses: dtolnay/rust-toolchain@stable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

def get_instrument_config_str_and_warns(self) -> tuple[str, list[str]]:
config = (
f"instrument: {self.mode.value}, "
f"mode: {self.mode.value}, "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont forget to fixup aswell

Copy link
Contributor

@GuillaumeLagrange GuillaumeLagrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I meant to request changes

Especially we need to validate the extra stack frame thing in instrumentation by comparing the output to a real prod run!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants