ProfileSVG.jl
ProfileSVG.jl copied to clipboard
Showing full specialization
cf. https://github.com/timholy/ProfileView.jl/pull/164
However, there is currently not enough room to display it. I think we will probably need a new popup UI.
The following excellent JuliaCon2021 workshop is a good reference on this. :+1:
Package development: improving engineering quality & latency
https://pretalx.com/juliacon2021/talk/VY9UVX/
And you would be disappointed that the method arguments are not shown. :sob: Unfortunately I don't have enough time right now to do any enhancements to this package.
However, if you just want to display the specialization information, you should be able to insert the data of sf.linfo
into the following shortinfo
variable, referring to the PR of ProfileView
above.
https://github.com/kimikage/ProfileSVG.jl/blob/70b3912f7c8715114567638000a0a66bd52cd91f/src/ProfileSVG.jl#L315
Also, the following time axis settings may be useful.
ProfileSVG.set_default(timeunit=:ms, delay=1e-9)
PR #62 makes it easier to apply a monkey patch. For example:
function ProfileSVG.extract_frameinfo(sf::ProfileSVG.StackFrame)
file = string(sf.file)
m = match(r"[^\\/]+$", file)
if m !== nothing
dirinfo = SubString(file, firstindex(file), m.offset - 1)
basename = m.match
else
dirinfo = ""
basename = file
end
func = sf.func
if sf.linfo isa Core.MethodInstance
func = replace(string(sf.linfo), "MethodInstance for " => "")
end
shortinfo = "$func in $basename:$(sf.line)"
return shortinfo, dirinfo
end
I have no plans to make a tag release for this for now. Please use pkg> add ProfileSVG#master
.