Precompilation No Effect ?!


Am trying to wrap my head around pre-compilation of a package.
Have read through SnoopCompile.jl · SnoopCompile and tried the steps myself.

So basically in my package I have:

if ccall(:jl_generating_output, Cint, ()) == 1
    for (root, dirs, files) in walkdir(joinpath(@__DIR__, "../precompile/directives"))
        for file in files
            if file != ".DS_Store"
                include(joinpath("..", root, file))

Have also tried (as whether to load pre-compilation files or call sample script instead wasn’t clear):

if ccall(:jl_generating_output, Cint, ()) == 1
    include(joinpath(@__DIR__, "../precompile/PrecompileSample.jl"))

However this seems to have no effect when I import my package into a project.
Have timed all 3 scenarios (no pre-compilation, pre-compilation loading pre-compilation files, pre-compilation including sample script), but there is no difference in execution of first function call.

I assume I am doing something wrong …

FYI my flamegraph looks like this:

Any advice?
Thank you

Also if I run my package tests with above mentioned 3 scenarios, using pre-compilation makes tests slightly slower. Really confused here …