From 0ba64c42cad7aa1a92ede36cdf27e30a8d973175 Mon Sep 17 00:00:00 2001 From: idast772 <idast772@tlhw-4-2.ad.liu.se> Date: Tue, 8 Oct 2019 12:40:50 +0200 Subject: [PATCH] Fixed the bottleneck in profiling. --- profiling/test.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/profiling/test.jl b/profiling/test.jl index 467ae03..43f691c 100644 --- a/profiling/test.jl +++ b/profiling/test.jl @@ -1,7 +1,9 @@ using BenchmarkTools using Random +using Profile function f() + lst = rand(50000) for i in lst if i > 0.99 @@ -9,6 +11,7 @@ function f() print(s) end end + end f() @@ -16,3 +19,7 @@ f() x = @benchmark f() println() println(x) + +@profile f() +Profile.print() +Profile.clear() -- GitLab