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

Flamegraphs #137

Open
wants to merge 100 commits into
base: main
Choose a base branch
from
Open

Flamegraphs #137

wants to merge 100 commits into from

Conversation

brainstorm
Copy link
Member

@brainstorm brainstorm commented Jan 16, 2023

Adds a custom profiler to criterion-rs which plots flamegraphs, following this blogpost.

How to test this:

cargo flamegraph --deterministic --flamechart -o flamechart.svg --bench search-benchmarks -- --bench

Seemingly there's an issue with Criterion's custom profiler registration as the .SVG output files are not generated... yet.

…ts, both locally and on the target CI environment (GHA).
…ing deprecated :-S)... more inline format clippy warnings that do not show locally despite cargo clean-ing and making sure same versions are running on CI and local :/
@brainstorm
Copy link
Member Author

brainstorm commented Jan 16, 2023

After bumping into flamegraph-rs/flamegraph#39 (comment), I realised that we don't need this to be integrated with Criterion anymore:

Screenshot 2023-01-16 at 2 32 42 pm

Screenshot 2023-01-16 at 4 47 24 pm

I'll refactor accordingly and integrate that SVG into the gh-pages payload(s).

EDIT: Those stack traces contain a significant amount of bench-related stack calls that we don't want, I'll learn how to filter those so that it only includes the Bam::Query info, which is the one we'd like to compare over time.

EDIT2: Couple of issues reported upstream worth tracking: flamegraph-rs/flamegraph#247 and flamegraph-rs/flamegraph#246

@brainstorm brainstorm marked this pull request as ready for review January 16, 2023 05:25
Copy link
Member

@victorskl victorskl left a comment

Choose a reason for hiding this comment

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

Love the flame! 🔥

@brainstorm brainstorm added this to In progress in 1.0.0 Jan 18, 2023
@brainstorm
Copy link
Member Author

This needs to be followed up with not-perf since perf generates way too much data (~4GB) for this to be practical/runnable under free tier CI, see for details: flamegraph-rs/flamegraph#248 (comment)

@brainstorm brainstorm self-assigned this May 4, 2023
@brainstorm
Copy link
Member Author

Followup on profiling fixes/discussion happening on koute/not-perf#32 and cmyr/cargo-instruments#84 (comment)

@brainstorm
Copy link
Member Author

brainstorm commented Jan 13, 2024

@brainstorm brainstorm moved this from In progress to To do in 1.0.0 Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
1.0.0
To do
Development

Successfully merging this pull request may close these issues.

None yet

3 participants