profile: VICTORY_PROFILE windows that overlap silently produce empty or truncated profiles #284
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD#284
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@itsonewi on GitHub · 2026-11-26 18:51 UTC · original
What happens
crates/victory-loader/src/profile.rs:profile_on_schedule(:63-74) readsfrom,to,ms,file;…and runs every profile in one thread, one after another, all against the singlestarttaken when the switch was read. Each profile sleeps until its ownfrom(:77, absolute fromstart) and then sampleswhile start.elapsed() < to(:85).With
VICTORY_PROFILE=0,60,5,a.txt;30,90,5,b.txt— the shape the module documents ("several of them, one after another, with;between") — the second profile cannot begin before the first ends at 60 s, and its deadline (90 s) is then only 30 s away: it samples half the window it was given. If the first window ends after the second one'sto, the second writes a file withrounds 0and still prints "the profile is in b.txt" (:109), with no warning.Why it matters
A profiling window that silently covers less (or none) of the time asked for gives a stack file that looks complete and is not — easy to read as "nothing was running then".
Suggested fix
Measure each window from the moment that window starts (sleep
from, thenwhile elapsed < to - from), or keep the absolute times but warn when a profile'sfromhad already passed, or itstohad already elapsed, when its turn came.AI use
Found by reading
crates/victory-loader/src/profile.rs. No code was built or run.github-bot referenced this issue2026-11-26 20:12:50 +00:00
@lerapeurdu62280-debug on GitHub · 2026-11-26 21:16 UTC · original
Two open PRs fix this: #321 (@Spetrius, +51) and #316 (@battledogegames-design, +191). They conflict with each other in
profile.rs, so only one can land. I tested both ona-publiercd8dfc0(Windows 10 Pro 19045, RX 6600, Rust 1.98.1,--features diagnostics, since the module only exists there):beginscomputes when each window can start)turn: on time / late / elapsed)profile()calls, ~0.4 s)-D warnings(with #330, fora-publier's own lint)Both are correct for this issue. #321 is the smaller change and tells you before anything runs. #316 also covers the unparsable entries and the stale file, at the cost of timing-based tests. If you want one: #316 covers more, and #321's up-front warning could be added to it later.
AI-assisted: yes (Claude Code)