Skip to content

Fix timers with TimerOutputs v1 - #1354

Merged
efaulhaber merged 2 commits into
trixi-framework:mainfrom
efaulhaber:fix-timer-output
Oct 12, 2026
Merged

efaulhaber merged 2 commits into
trixi-framework:mainfrom
efaulhaber:fix-timer-output

Conversation

@efaulhaber

Copy link
Copy Markdown
Member

Apparently, #1303 got merged without anyone actually checking any timers, which caused the timers to get messed up on main.

On main, the timers get very wide when the window allows for it:

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
                                                        Time                             Allocations             
                                          ────────────────────────────────    ──────────────────────────────────
            Tot / % measured:                      660ms / 92.8%                        336MiB / 99.7%
 ───────────────────────────────────────  ────────────────────────────────    ──────────────────────────────────
 Section                          ncalls    time    %tot     avg                alloc    %tot      avg
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 save solution                        50   458ms   74.8%  9.17ms  ██████       326MiB   97.3%  6.51MiB  ███████▊ 
 ├─ write to vtk                     100   419ms   68.4%  4.19ms  █████▌       321MiB   95.8%  3.21MiB  ███████▋ 
 ├─ ~save solution~                   50  28.5ms    4.7%   571μs  ▍           3.31MiB    1.0%  67.7KiB  ▏        
 ├─ update dvdu                       50  7.51ms    1.2%   150μs  ▏           1.30MiB    0.4%  26.5KiB           
 └─ update systems                    50  3.16ms    0.5%  63.2μs               232KiB    0.1%  4.64KiB           
 kick!                             1.16k   150ms   24.5%   130μs  ██          8.84MiB    2.6%  7.82KiB  ▎        
 ├─ system interaction             1.16k  96.9ms   15.8%  83.7μs  █▎          4.08MiB    1.2%  3.61KiB  ▏        
 │  ├─ fluid1-fluid1               1.16k  69.9ms   11.4%  60.4μs  ▉            615KiB    0.2%     544B           
 │  ├─ fluid1-boundary2            1.16k  24.1ms    3.9%  20.8μs  ▍            615KiB    0.2%     544B           
 │  ├─ ~system interaction~        1.16k  2.84ms    0.5%  2.45μs              2.88MiB    0.9%  2.55KiB  ▏        
 │  ├─ boundary2-fluid1            1.16k  15.4μs    0.0%  13.3ns                    ∅       ∅        ∅           
 │  └─ boundary2-boundary2         1.16k  14.3μs    0.0%  12.4ns                    ∅       ∅        ∅           
 ├─ update systems and nhs         1.16k  45.6ms    7.4%  39.4μs  ▋           4.47MiB    1.3%  3.96KiB  ▏        
 │  ├─ compute boundary pressure   1.16k  24.3ms    4.0%  21.0μs  ▍            760KiB    0.2%     672B           
 │  ├─ update nhs                  1.16k  11.7ms    1.9%  10.1μs  ▏           3.18MiB    1.0%  2.81KiB  ▏        
 │  ├─ inverse state equation      1.16k  5.62ms    0.9%  4.86μs  ▏            344KiB    0.1%     304B           
 │  ├─ ~update systems and nhs~    1.16k  3.94ms    0.6%  3.40μs               218KiB    0.1%     193B           
 │  └─ update density diffusion    1.16k  13.1μs    0.0%  11.3ns                    ∅       ∅        ∅            
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────

With a smaller window, section names get cropped to the point where they are unreadable:

─────────────────────────────────────────────────────────────────────────────────────────────────────
                                            Time                             Allocations             
                              ────────────────────────────────    ──────────────────────────────────
      Tot / % measured:                723ms / 86.0%                        336MiB / 99.7%
 ───────────────────────────  ────────────────────────────────    ──────────────────────────────────
 Section              ncalls    time    %tot     avg                alloc    %tot      avg
─────────────────────────────────────────────────────────────────────────────────────────────────────
 save solution            50   465ms   74.7%  9.29ms  ██████       326MiB   97.3%  6.51MiB  ███████▊ 
 ├─ write to vtk         100   430ms   69.2%  4.30ms  █████▌       321MiB   95.8%  3.21MiB  ███████▋ 
 ├─ ~save solution~       50  26.6ms    4.3%   532μs  ▍           3.31MiB    1.0%  67.7KiB  ▏        
 ├─ update dvdu           50  5.81ms    0.9%   116μs  ▏           1.30MiB    0.4%  26.5KiB           
 └─ update systems        50  2.09ms    0.3%  41.8μs               232KiB    0.1%  4.64KiB           
 kick!                 1.16k   155ms   25.0%   134μs  ██          8.84MiB    2.6%  7.82KiB  ▎        
 ├─ system interact…   1.16k   104ms   16.7%  89.6μs  █▍          4.08MiB    1.2%  3.61KiB  ▏        
 │  ├─ fluid1-fluid1   1.16k  76.2ms   12.3%  65.8μs  █            615KiB    0.2%     544B           
 │  ├─ fluid1-bound…   1.16k  24.6ms    3.9%  21.2μs  ▍            615KiB    0.2%     544B           
 │  ├─ ~system inte…   1.16k  2.89ms    0.5%  2.49μs              2.88MiB    0.9%  2.55KiB  ▏        
 │  ├─ boundary2-bo…   1.16k  15.2μs    0.0%  13.1ns                    ∅       ∅        ∅           
 │  └─ boundary2-fl…   1.16k  14.1μs    0.0%  12.2ns                    ∅       ∅        ∅           
 ├─ update systems …   1.16k  45.9ms    7.4%  39.7μs  ▋           4.47MiB    1.3%  3.96KiB  ▏        
 │  ├─ compute boun…   1.16k  19.2ms    3.1%  16.6μs  ▎            760KiB    0.2%     672B           
 │  ├─ update nhs      1.16k  15.6ms    2.5%  13.5μs  ▎           3.18MiB    1.0%  2.81KiB  ▏        
 │  ├─ inverse stat…   1.16k  6.53ms    1.1%  5.64μs  ▏            344KiB    0.1%     304B           
 │  ├─ ~update syst…   1.16k  4.59ms    0.7%  3.96μs               218KiB    0.1%     193B           
 │  └─ update densi…   1.16k  13.3μs    0.0%  11.5ns                    ∅       ∅        ∅           
─────────────────────────────────────────────────────────────────────────────────────────────────────

This PR restores the original timers that are readable at smaller window sizes as well:

─────────────────────────────────────────────────────────────────────────────────────────────
                                                   Time                   Allocations        
                                          ──────────────────────    ────────────────────────
            Tot / % measured:                 7.80s / 40.4%             1.41GiB / 31.6%
 ───────────────────────────────────────  ──────────────────────    ────────────────────────
 Section                          ncalls    time    %tot     avg      alloc    %tot      avg
─────────────────────────────────────────────────────────────────────────────────────────────
 save solution                        50   2.87s   91.1%  57.3ms     448MiB   98.0%  8.95MiB
 ├─ write to vtk                     100   2.40s   76.2%  24.0ms     409MiB   89.6%  4.09MiB
 ├─ ~save solution~                   50   310ms    9.8%  6.19ms    25.2MiB    5.5%   517KiB
 ├─ update dvdu                       50   157ms    5.0%  3.14ms    13.1MiB    2.9%   267KiB
 └─ update systems                    50  1.30ms    0.0%  26.0μs     232KiB    0.0%  4.64KiB
 kick!                             1.16k   265ms    8.4%   229μs    8.84MiB    1.9%  7.82KiB
 ├─ system interaction             1.16k   157ms    5.0%   135μs    4.08MiB    0.9%  3.61KiB
 │  ├─ fluid1-fluid1               1.16k   106ms    3.4%  91.9μs     615KiB    0.1%     544B
 │  ├─ fluid1-boundary2            1.16k  48.0ms    1.5%  41.4μs     615KiB    0.1%     544B
 │  ├─ ~system interaction~        1.16k  2.39ms    0.1%  2.06μs    2.88MiB    0.6%  2.55KiB
 │  ├─ boundary2-fluid1            1.16k  13.1μs    0.0%  11.3ns          ∅       ∅        ∅
 │  └─ boundary2-boundary2         1.16k  12.4μs    0.0%  10.7ns          ∅       ∅        ∅
 ├─ update systems and nhs         1.16k  77.2ms    2.5%  66.7μs    4.47MiB    1.0%  3.96KiB
 │  ├─ compute boundary pressure   1.16k  27.3ms    0.9%  23.6μs     760KiB    0.2%     672B
 │  ├─ update nhs                  1.16k  25.4ms    0.8%  21.9μs    3.18MiB    0.7%  2.81KiB
 │  ├─ inverse state equation      1.16k  18.3ms    0.6%  15.8μs     344KiB    0.1%     304B
 │  ├─ ~update systems and nhs~    1.16k  6.23ms    0.2%  5.38μs     218KiB    0.0%     193B
 │  └─ update density diffusion    1.16k  11.7μs    0.0%  10.1ns          ∅       ∅        ∅
─────────────────────────────────────────────────────────────────────────────────────────────

@efaulhaber
efaulhaber requested a review from svchb October 11, 2026 08:26
@efaulhaber efaulhaber self-assigned this Oct 11, 2026
@efaulhaber efaulhaber added the bug Something isn't working label Oct 11, 2026
@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.96%. Comparing base (8bcd507) to head (8f9757d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1354   +/-   ##
=======================================
  Coverage   90.96%   90.96%           
=======================================
  Files         143      143           
  Lines       11544    11544           
=======================================
  Hits        10501    10501           
  Misses       1043     1043           
Flag Coverage Δ
total 90.96% <ø> (ø)
unit 78.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@svchb
svchb enabled auto-merge (squash) October 11, 2026 12:36
@efaulhaber
efaulhaber disabled auto-merge October 12, 2026 10:58
@efaulhaber
efaulhaber enabled auto-merge (squash) October 12, 2026 10:58
@efaulhaber

Copy link
Copy Markdown
Member Author

/run-gpu-tests

@efaulhaber
efaulhaber merged commit 15c80e7 into trixi-framework:main Oct 12, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants