Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect warning given when running flamegraph for a unit test #311

Open
samyak-jain opened this issue Mar 9, 2024 · 2 comments
Open

Comments

@samyak-jain
Copy link

When running the flamegraph command, I get the following warning:

WARNING: profiling without debuginfo. Enable symbol information by adding the following lines to Cargo.toml:

[profile.bench]
debug = true

Or set this environment variable:

CARGO_PROFILE_BENCH_DEBUG=true

However, this is incorrect since to make this warning go away, I need to use profile.release instead. I am using the following command:

cargo flamegraph --unit-test -- example_test

It seems from here:

let profile = match opt
that unit tests should set the profile as release but that doesn't seem to be happening.

@djc
Copy link
Contributor

djc commented Mar 11, 2024

Thanks for the report. Unfortunately I probably won't be able to address this anytime soon -- however, happy to review a PR if you're able to suggest a fix (or answer questions about doing so).

@RRRadicalEdward
Copy link
Contributor

@samyak-jain how did you manage to get the warning?
I'm trying the command and for me it reports:

WARNING: profiling without debuginfo. Enable symbol information by adding the following lines to Cargo.toml:

[profile.release]
debug = true

Or set this environment variable:

CARGO_PROFILE_RELEASE_DEBUG=true

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

No branches or pull requests

3 participants