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

Add Pprof Profiling to Existing Benchmarks #273

Merged
merged 24 commits into from
Nov 11, 2022
Merged

Conversation

oojo12
Copy link
Contributor

@oojo12 oojo12 commented Nov 9, 2022

Resolves #272.

By the way running the benchmarks in the background and will update #228 once if this is approved.

@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2022

Codecov Report

Base: 38.75% // Head: 38.68% // Decreases project coverage by -0.06% ⚠️

Coverage data is based on head (055eb24) compared to base (c301cee).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
- Coverage   38.75%   38.68%   -0.07%     
==========================================
  Files          93       93              
  Lines        6087     6087              
==========================================
- Hits         2359     2355       -4     
- Misses       3728     3732       +4     
Impacted Files Coverage Δ
...rithms/linfa-trees/src/decision_trees/algorithm.rs 37.94% <0.00%> (-1.79%) ⬇️
algorithms/linfa-nn/tests/nn.rs 75.60% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@oojo12
Copy link
Contributor Author

oojo12 commented Nov 9, 2022

The windows failures are because pprof won't compile correctly there. I had to use wsl to compile. Is there something like bench_dependencies for cargo so we can resolve this? Tried googling but didn't find anything

@oojo12
Copy link
Contributor Author

oojo12 commented Nov 9, 2022

Actually just found docs

@YuhanLiin
Copy link
Collaborator

YuhanLiin commented Nov 9, 2022

Do the benchmarks also output a text profile report?

@oojo12
Copy link
Contributor Author

oojo12 commented Nov 9, 2022

Not sure I can look into it later in the week. Example flamegraph.svg's from running this are attached. I'll add the relevant one to #262. Let me know if you prefer the proto format, to me it seems more user friendly.

criterion.zip

@YuhanLiin
Copy link
Collaborator

The zip file only contains the flamegraphs. I guess the profiler doesn't output any extra text right? Also, Criterion still outputs graphs just like before right?

As for the format, I still prefer flamegraphs since that's what I'm used to, but ideally I'd like to have both flamegraphs and the proto format.

@YuhanLiin
Copy link
Collaborator

As part of this PR, can you also update the Linfa benchmark standards? We should do it once the profiling code is finalized.

@oojo12
Copy link
Contributor Author

oojo12 commented Nov 10, 2022

The zip file only contains the flamegraphs. I guess the profiler doesn't output any extra text right? Also, Criterion still outputs graphs just like before right?

As for the format, I still prefer flamegraphs since that's what I'm used to, but ideally I'd like to have both flamegraphs and the proto format.

It is one or the other you either output flamegraphs or use criterion as the measurement method. See here for documentation evidence. As for the format I believe it is either flamegraph format or proto format. I don't think you can do both without running the benchmark twice. Not a problem to add just not sure if the value add is worth it.

@oojo12
Copy link
Contributor Author

oojo12 commented Nov 10, 2022

As part of this PR, can you also update the Linfa benchmark standards? We should do it once the profiling code is finalized.

yep once we agree on this PR being ready for merge I plan to.

CONTRIBUTE.md Outdated Show resolved Hide resolved
@YuhanLiin YuhanLiin merged commit 44b244c into rust-ml:master Nov 11, 2022
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.

Add Profiling Hook to Criterion Benchmarks
3 participants