I want to measure the time from the moment the code enters pmap
and exit it. Also, I want to store it in a variable. So is there a way I can store the output of @time
or is there a julia package that does it more efficiently?
using Distributed
addprocs(4)
@everywhere function sqr(x)
return x^2
end
pmap(x->sqr(x), 1:100)
I believe I am looking for something similar to tic()
and toc()
which are no more available in current julia version (1.5.0)