# Collecting coverage data from worker processes

**URL:** <https://discourse.julialang.org/t/collecting-coverage-data-from-worker-processes/5525>\
**Category:** General Usage\
**Created:** [August 23, 2017, 12:09pm UTC](https://discourse.julialang.org/t/collecting-coverage-data-from-worker-processes/5525 "2017-08-23T12:09:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fjarri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fjarri/32/630_2.png) [@fjarri](https://discourse.julialang.org/u/fjarri)\
**Post date:** [August 23, 2017, 12:09pm UTC](https://discourse.julialang.org/t/collecting-coverage-data-from-worker-processes/5525/1 "2017-08-23T12:09:54Z")

</div>

In Julia v0.6 (and a semi-recent nightly), the coverage is only collected for the main process:

```julia
@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:

```julia
1
	From worker 2:	2

```

while the coverage output shows that the second `println` was not touched:

```julia
        - @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?

---

<div class="post-metadata">

**Author:** ![fjarri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fjarri/32/630_2.png) [@fjarri](https://discourse.julialang.org/u/fjarri)\
**Post date:** [August 24, 2017, 1:26am UTC](https://discourse.julialang.org/t/collecting-coverage-data-from-worker-processes/5525/2 "2017-08-24T01:26:17Z")

</div>

Opened a [feature request](https://github.com/JuliaLang/julia/issues/23416) for Julia about it.
