Skip to content

Add compile workload timing prints when PRECOMPILETOOLS_TIMING=1#72

Open
IanButterworth wants to merge 2 commits intoJuliaLang:mainfrom
IanButterworth:ib/timing
Open

Add compile workload timing prints when PRECOMPILETOOLS_TIMING=1#72
IanButterworth wants to merge 2 commits intoJuliaLang:mainfrom
IanButterworth:ib/timing

Conversation

@IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Dec 7, 2025

Just gives one level of granularity per top line in the expr, and a total @time at the end. (reassuringly GLMakie spends 94% of its time compiling)

% PRECOMPILETOOLS_TIMING=1 julia -q
julia> using GLMakie
[ Info: Precompiling GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] (caches not reused: 1 for dependency identifier changed)
[ Info:       4 ms: GLMakie.activate!()
[ Info:    1255 ms: screen = GLMakie.singleton_screen(false)
[ Info:     319 ms: close(screen)
[ Info:      71 ms: destroy!(screen)
[ Info:       0 ms: base_path = normpath(joinpath(dirname(pathof(Makie)), "..", "precompile"))
[ Info:       0 ms: shared_precompile = joinpath(base_path, "shared-precompile.jl")
 17.258217 seconds (144.47 M allocations: 8.297 GiB, 8.12% gc time, 94.54% compilation time: 1% of which was recompilation)
[ Info:   17270 ms: #= /Users/ian/Documents/GitHub/Makie.jl/GLMakie/src/precompiles.jl:26 =# @time include(shared_precompile)
┌ Info:     167 ms:
│ try
│     #= /Users/ian/Documents/GitHub/Makie.jl/GLMakie/src/precompiles.jl:28 =#
│     display(plot(x); visible = false)
│ catch
│     #= /Users/ian/Documents/GitHub/Makie.jl/GLMakie/src/precompiles.jl:29 =#
└ end
[ Info:       0 ms: Makie.CURRENT_FIGURE[] = nothing
[ Info:      38 ms: screen = Screen(Scene())
[ Info:       1 ms: refresh_func = refreshwindowcb(screen)
[ Info:       2 ms: refresh_func(to_native(screen))
[ Info:      20 ms: close(screen)
[ Info:       9 ms: screen = empty_screen(false)
[ Info:       2 ms: close(screen)
[ Info:       3 ms: destroy!(screen)
[ Info:       6 ms: screen = empty_screen(false, false, nothing)
[ Info:       4 ms: destroy!(screen)
[ Info:       0 ms: config = Makie.merge_screen_config(ScreenConfig, Dict{Symbol, Any}())
[ Info:       4 ms: screen = Screen(Scene(), config, nothing, (MIME"image/png")(); visible = false, start_renderloop = false)
[ Info:       0 ms: close(screen)
[ Info:       0 ms: config = Makie.merge_screen_config(ScreenConfig, Dict{Symbol, Any}())
[ Info:       2 ms: screen = Screen(Scene(), config; visible = false, start_renderloop = false)
[ Info:       0 ms: close(screen)
[ Info:      63 ms: closeall(; empty_shader = false)
[ Info:       1 ms: #= /Users/ian/Documents/GitHub/Makie.jl/GLMakie/src/precompiles.jl:52 =# @assert isempty(SCREEN_REUSE_POOL)
[ Info:       0 ms: #= /Users/ian/Documents/GitHub/Makie.jl/GLMakie/src/precompiles.jl:53 =# @assert isempty(ALL_SCREENS)
[ Info:       1 ms: #= /Users/ian/Documents/GitHub/Makie.jl/GLMakie/src/precompiles.jl:54 =# @assert isempty(SINGLETON_SCREEN)
@compile_workload: 19.292506 seconds (158.20 M allocations: 8.949 GiB, 7.76% gc time, 93.73% compilation time: 1% of which was recompilation)

@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

❌ Patch coverage is 67.74194% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.90%. Comparing base (542d964) to head (9e1c8a8).

Files with missing lines Patch % Lines
src/workloads.jl 67.74% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
- Coverage   82.47%   78.90%   -3.57%     
==========================================
  Files           3        3              
  Lines          97      128      +31     
==========================================
+ Hits           80      101      +21     
- Misses         17       27      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant