Skip to content

Commit d3bb253

Browse files
authored
Merge pull request #52 from PRONTOLab/mg/profile-c
Profile also calls to non-Julia functions
2 parents 91dba19 + 1213170 commit d3bb253

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/data_free_ocean_climate_simulation.jl

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ macro gbprofile(name::String, expr::Expr)
2626
println(s, "# at ", $(string(__source__)))
2727
$(Profile.print)(IOContext(s, :displaysize => (48, 1000)))
2828
end
29+
open(string("profile_with_c_", $(esc(name)), ".txt"), "w") do s
30+
println(s, "# Showing profile of")
31+
println(s, "# ", $(string(expr)))
32+
println(s, "# at ", $(string(__source__)))
33+
$(Profile.print)(IOContext(s, :displaysize => (48, 1000)); C=true)
34+
end
2935
$(Profile.clear)()
3036
out
3137
else

0 commit comments

Comments
 (0)