Skip to content

Instantly share code, notes, and snippets.

@lkapelevich
Created June 4, 2019 18:47
Show Gist options
  • Save lkapelevich/fa50d98fad72e30f673b501306660cc6 to your computer and use it in GitHub Desktop.
Save lkapelevich/fa50d98fad72e30f673b501306660cc6 to your computer and use it in GitHub Desktop.
write(
"test2.jl",
"""
using LinearAlgebra, Random
a = rand(10, 10)
b = Symmetric(a * a')
f = cholesky(b)
"""
)
j2 --trace-compile="ta.jl" "test2.jl"
using SnoopCompile
SnoopCompile.@snoopc joinpath(@__DIR__(), "dummy.log") begin
using LinearAlgebra, SparseArrays
include(abspath("test2.jl"))
end
data = SnoopCompile.read(joinpath(@__DIR__(), "dummy.log"))
pc = SnoopCompile.format_userimg(reverse!(data[2]))
SnoopCompile.write(joinpath(@__DIR__(), "sc.jl"), pc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment