StatProfilerHTML.jl
StatProfilerHTML.jl copied to clipboard
@profilehtml doesn't work with blocks
% julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.7.1 (2021-12-22)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using StatProfilerHTML
julia> @profilehtml begin
sleep(1)
end
ERROR: InexactError: trunc(Int64, Inf)
Stacktrace:
[1] trunc
@ ./float.jl:805 [inlined]
[2] round
@ ./float.jl:369 [inlined]
[3] #103
@ ~/.julia/packages/StatProfilerHTML/FRimo/src/HTML.jl:46 [inlined]
[4] |>
@ ./operators.jl:966 [inlined]
[5] #69
@ ~/.julia/packages/StatProfilerHTML/FRimo/haml/flamegraphitem.hamljl:15 [inlined]
[6] (::StatProfilerHTML.HTML.var"#69#76"{Base.Pairs{Symbol, Any, NTuple{5, Symbol}, NamedTuple{(:report, :node, :x, :y, :scale), Tuple{StatProfilerHTML.Reports.Report{DataStructures.DefaultDict{LineNumberNode, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{Union{Nothing, Symbol}, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.TracePoint, StatProfilerHTML.Reports.TraceCounts, typeof(StatProfilerHTML.Reports.default4)}, typeof(StatProfilerHTML.Reports.default1)}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, Int64, typeof(StatProfilerHTML.Reports.default0)}, typeof(StatProfilerHTML.Reports.default2)}, DataStructures.DefaultDict{LineNumberNode, Symbol, typeof(StatProfilerHTML.Reports.default3)}, LeftChildRightSiblingTrees.Node{FlameGraphs.NodeData}}, Base.RefValue{Any}, Base.RefValue{Float64}, Int64, Float64}}}, StatProfilerHTML.HTML.var"#82#87"{StatProfilerHTML.HTML.var"#84#88"{IOStream}}, String, Int64})()
@ StatProfilerHTML.HTML ./none:0
[7] surround(f::StatProfilerHTML.HTML.var"#69#76"{Base.Pairs{Symbol, Any, NTuple{5, Symbol}, NamedTuple{(:report, :node, :x, :y, :scale), Tuple{StatProfilerHTML.Reports.Report{DataStructures.DefaultDict{LineNumberNode, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{Union{Nothing, Symbol}, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.TracePoint, StatProfilerHTML.Reports.TraceCounts, typeof(StatProfilerHTML.Reports.default4)}, typeof(StatProfilerHTML.Reports.default1)}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, Int64, typeof(StatProfilerHTML.Reports.default0)}, typeof(StatProfilerHTML.Reports.default2)}, DataStructures.DefaultDict{LineNumberNode, Symbol, typeof(StatProfilerHTML.Reports.default3)}, LeftChildRightSiblingTrees.Node{FlameGraphs.NodeData}}, Base.RefValue{Any}, Base.RefValue{Float64}, Int64, Float64}}}, StatProfilerHTML.HTML.var"#82#87"{StatProfilerHTML.HTML.var"#84#88"{IOStream}}, String, Int64}, before::StatProfilerHTML.HTML.var"#70#77"{StatProfilerHTML.HTML.var"#82#87"{StatProfilerHTML.HTML.var"#84#88"{IOStream}}}, after::StatProfilerHTML.HTML.var"#71#78"{StatProfilerHTML.HTML.var"#82#87"{StatProfilerHTML.HTML.var"#84#88"{IOStream}}})
@ HAML.Helpers ~/.julia/packages/HAML/u5i89/src/Helpers.jl:5
[8] macro expansion
@ ~/.julia/packages/HAML/u5i89/src/Codegen.jl:279 [inlined]
[9] var"/Users/ghazel/.julia/packages/StatProfilerHTML/FRimo/haml/flamegraphitem.hamljl"(f::StatProfilerHTML.HTML.var"#82#87"{StatProfilerHTML.HTML.var"#84#88"{IOStream}}, indent::String; variables::Base.Pairs{Symbol, Any, NTuple{5, Symbol}, NamedTuple{(:report, :node, :x, :y, :scale), Tuple{StatProfilerHTML.Reports.Report{DataStructures.DefaultDict{LineNumberNode, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{Union{Nothing, Symbol}, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.TracePoint, StatProfilerHTML.Reports.TraceCounts, typeof(StatProfilerHTML.Reports.default4)}, typeof(StatProfilerHTML.Reports.default1)}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, Int64, typeof(StatProfilerHTML.Reports.default0)}, typeof(StatProfilerHTML.Reports.default2)}, DataStructures.DefaultDict{LineNumberNode, Symbol, typeof(StatProfilerHTML.Reports.default3)}, LeftChildRightSiblingTrees.Node{FlameGraphs.NodeData}}, Base.RefValue{Any}, Base.RefValue{Float64}, Int64, Float64}}})
@ StatProfilerHTML.HTML ~/.julia/packages/HAML/u5i89/src/Templates.jl:14
[10] render_flamegraph(f::StatProfilerHTML.HTML.var"#84#88"{IOStream}, indent::String; variables::Base.Pairs{Symbol, StatProfilerHTML.Reports.Report{DataStructures.DefaultDict{LineNumberNode, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{Union{Nothing, Symbol}, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.TracePoint, StatProfilerHTML.Reports.TraceCounts, typeof(StatProfilerHTML.Reports.default4)}, typeof(StatProfilerHTML.Reports.default1)}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, Int64, typeof(StatProfilerHTML.Reports.default0)}, typeof(StatProfilerHTML.Reports.default2)}, DataStructures.DefaultDict{LineNumberNode, Symbol, typeof(StatProfilerHTML.Reports.default3)}, LeftChildRightSiblingTrees.Node{FlameGraphs.NodeData}}, Tuple{Symbol}, NamedTuple{(:report,), Tuple{StatProfilerHTML.Reports.Report{DataStructures.DefaultDict{LineNumberNode, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{Union{Nothing, Symbol}, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.TracePoint, StatProfilerHTML.Reports.TraceCounts, typeof(StatProfilerHTML.Reports.default4)}, typeof(StatProfilerHTML.Reports.default1)}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, Int64, typeof(StatProfilerHTML.Reports.default0)}, typeof(StatProfilerHTML.Reports.default2)}, DataStructures.DefaultDict{LineNumberNode, Symbol, typeof(StatProfilerHTML.Reports.default3)}, LeftChildRightSiblingTrees.Node{FlameGraphs.NodeData}}}}})
@ StatProfilerHTML.HTML ~/.julia/packages/HAML/u5i89/src/Templates.jl:19
[11] #render_flamegraph#83
@ ~/.julia/packages/HAML/u5i89/src/Templates.jl:87 [inlined]
[12] #108
@ ~/.julia/packages/StatProfilerHTML/FRimo/src/HTML.jl:71 [inlined]
[13] open(f::StatProfilerHTML.HTML.var"#108#114"{StatProfilerHTML.Reports.Report{DataStructures.DefaultDict{LineNumberNode, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{Union{Nothing, Symbol}, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.TracePoint, StatProfilerHTML.Reports.TraceCounts, typeof(StatProfilerHTML.Reports.default4)}, typeof(StatProfilerHTML.Reports.default1)}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, Int64, typeof(StatProfilerHTML.Reports.default0)}, typeof(StatProfilerHTML.Reports.default2)}, DataStructures.DefaultDict{LineNumberNode, Symbol, typeof(StatProfilerHTML.Reports.default3)}, LeftChildRightSiblingTrees.Node{FlameGraphs.NodeData}}}, args::String; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol, Symbol}, NamedTuple{(:write, :lock), Tuple{Bool, Bool}}})
@ Base ./io.jl:330
[14] lockfreeopenwrite
@ ~/.julia/packages/StatProfilerHTML/FRimo/src/HTML.jl:49 [inlined]
[15] output(r::StatProfilerHTML.Reports.Report{DataStructures.DefaultDict{LineNumberNode, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{Union{Nothing, Symbol}, StatProfilerHTML.Reports.TraceCounts, DataType}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.TracePoint, StatProfilerHTML.Reports.TraceCounts, typeof(StatProfilerHTML.Reports.default4)}, typeof(StatProfilerHTML.Reports.default1)}, DataStructures.DefaultDict{LineNumberNode, DataStructures.DefaultDict{StatProfilerHTML.Reports.FunctionPoint, Int64, typeof(StatProfilerHTML.Reports.default0)}, typeof(StatProfilerHTML.Reports.default2)}, DataStructures.DefaultDict{LineNumberNode, Symbol, typeof(StatProfilerHTML.Reports.default3)}, LeftChildRightSiblingTrees.Node{FlameGraphs.NodeData}}, path::String)
@ StatProfilerHTML.HTML ~/.julia/packages/StatProfilerHTML/FRimo/src/HTML.jl:70
[16] statprofilehtml(data::Vector{UInt64}, litrace::Dict{UInt64, Vector{Base.StackTraces.StackFrame}}; from_c::Bool, path::String)
@ StatProfilerHTML ~/.julia/packages/StatProfilerHTML/FRimo/src/StatProfilerHTML.jl:25
[17] statprofilehtml (repeats 3 times)
@ ~/.julia/packages/StatProfilerHTML/FRimo/src/StatProfilerHTML.jl:17 [inlined]
[18] top-level scope
@ ~/.julia/packages/StatProfilerHTML/FRimo/src/StatProfilerHTML.jl:39