In Julia v0.6 (and a semi-recent nightly), the coverage is only collected for the main process:
@everywhere function f(x)
if x == 1
println(1)
else
println(x)
end
end
@everywhere f(myid())
Running as julia --code-coverage=user --inline=no -p 1 t.jl
gives the output:
1
From worker 2: 2
while the coverage output shows that the second println
was not touched:
- @everywhere function f(x)
1 if x == 1
1 println(1)
- else
0 println(x)
- end
- end
-
- @everywhere f(myid())
-
Is there a way to tell Julia to collect the coverage from the worker processes as well?