File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,18 @@ import .Reports: Report
1313import . HTML: output
1414
1515function statprofilehtml (data:: Vector{<:Unsigned} = UInt[], litrace:: LineInfoDict = LineInfoDict ();
16- from_c= false )
16+ from_c= false , path = " statprof " )
1717 if length (data) == 0
1818 (data, litrace) = Profile. retrieve ()
1919 end
2020
21+ fullpath = abspath (path)
22+
2123 report = Report (data, litrace, from_c)
2224 sort! (report)
23- HTML. output (report, " statprof " )
25+ HTML. output (report, fullpath )
2426
25- @info " Wrote profiling output to file://$( pwd ()) /statprof /index.html ."
27+ @info " Wrote profiling output to file://$fullpath /index.html ."
2628end
2729
2830macro profilehtml (expr)
Original file line number Diff line number Diff line change 3333 end
3434end
3535
36+ @testset " non-standard path" begin
37+ mktempdir () do dir
38+ cd (dir) do
39+ @profile fibonacci (43 )
40+
41+ statprofilehtml (path= " foobar" )
42+
43+ @test isdir (" foobar" )
44+ @test ! isdir (" statprof" )
45+ end
46+ end
47+ end
48+
3649@testset " @profilehtml" begin
3750 mktempdir () do dir
3851 cd (dir) do
You can’t perform that action at this time.
0 commit comments