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

A grabbag of random fixes #212

Merged
merged 5 commits into from
Jan 12, 2021
Merged

A grabbag of random fixes #212

merged 5 commits into from
Jan 12, 2021

Conversation

timholy
Copy link
Owner

@timholy timholy commented Jan 11, 2021

These are things I fixed while using this in practice. Unfortunately I don't have tests for them (bad, bad), I guess when I encountered them in practice I felt it was important to keep moving.

Better to have them than not, I think.

@codecov
Copy link

codecov bot commented Jan 11, 2021

Codecov Report

Merging #212 (fb4c0aa) into master (1851f20) will increase coverage by 0.63%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #212      +/-   ##
==========================================
+ Coverage   81.48%   82.11%   +0.63%     
==========================================
  Files           9        9              
  Lines        1118     1124       +6     
==========================================
+ Hits          911      923      +12     
+ Misses        207      201       -6     
Impacted Files Coverage Δ
src/parcel_snoopi.jl 94.19% <100.00%> (+0.02%) ⬆️
src/parcel_snoopi_deep.jl 83.79% <100.00%> (+1.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1851f20...fb4c0aa. Read the comment docs.

@timholy timholy merged commit de8b0d6 into master Jan 12, 2021
@timholy timholy deleted the teh/various_fixes branch January 12, 2021 06:13
@@ -905,8 +911,8 @@ The empty horizontal periods in the flamegraph correspond to times when somethin
The total width of the flamegraph is set from the `ROOT` node.
"""
function FlameGraphs.flamegraph(tinf::InferenceTimingNode; tmin = 0.0, excluded_modules=Set([Main::Module]), mode=nothing)
isROOT(tinf) && isempty(tinf.children) && error("root node has no children")
Copy link
Collaborator

Choose a reason for hiding this comment

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

@timholy I just hit this error in usage of this package..

It seems to me that it's much better to just return an otherwise empty profile, with just the single ROOT node.
From what i can tell, without this check, it does return that empty profile correctly.

Can we remove this line? I'm curious if you remember the motivation to add it.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I don't. I guess I was thinking the error explained what was going on, whereas a blank ProfileView window might just be confusing. For me the usual invocation is ProfileView.view(flamegraph(tinf)).

Copy link
Owner Author

Choose a reason for hiding this comment

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

Very happy to have you change this though!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, makes sense. I think i was thinking that if it's empty, then it's empty! 😅 But you're right that it's not as nice as if it said "hey this is empty."

Maybe we can print a warning instead of throwing an error?

Our use case is that we're creating this via an HTTP endpoint on prod servers now (!!), and i don't want that to throw an error and return a 500:
JuliaPerf/ProfileEndpoints.jl#16

K, thanks, i'll send a quick PR

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.

2 participants