Skip to content

fix: keep the sub-task entries of stopped profiling tasks - #2279

Merged
cdietrich merged 1 commit into
eclipse-langium:mainfrom
cdietrich:fix/profiling-record-entries
Nov 18, 2026
Merged

cdietrich merged 1 commit into
eclipse-langium:mainfrom
cdietrich:fix/profiling-record-entries

Conversation

@cdietrich

Copy link
Copy Markdown
Contributor

Fixes #2277

ProfilingTask.stop() handed its own entries map to the new record and cleared that map right after addRecord. So every record returned by getRecords() ended up with empty entries; only the console table, which is printed before the clear, showed the sub-tasks.

As discussed in #2277, entries is no longer readonly, and stop() starts a fresh map for the next run instead of clearing the one the record keeps.

Test: the new profiler.test.ts runs a task twice and checks that each record keeps its own sub-task entries. It fails on main (the first record's entries are empty) and passes with the fix. npm run build, npm run lint and npm test pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XkvVhAAk5NRLH75qMHMc3m

ProfilingTask.stop() handed its own entries map to the new record and cleared that map right
after, so every record returned by getRecords() had empty entries; only the console table, printed
before the clear, showed the sub-tasks. Start a fresh map for the next run instead of clearing the
one the record keeps.

Fixes eclipse-langium#2277

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkvVhAAk5NRLH75qMHMc3m
@cdietrich
cdietrich merged commit ec10a13 into eclipse-langium:main Nov 18, 2026
4 checks passed
@cdietrich
cdietrich deleted the fix/profiling-record-entries branch November 18, 2026 10:41
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.

Profiling records returned by getRecords() have empty entries – intended?

2 participants