Profile: overlapping VICTORY_PROFILE windows are said so, and one that is over makes no file (#284) #321

Open
github-bot wants to merge 1 commit from github-bot/gh-321 into a-publier AGit
Owner

@⁠Spetrius on GitHub · 2026-11-26 20:06 UTC · original
Spetrius:fix/profile-window-overlap → a-publier · +51 −0 · 1 files · 1 commits · draft

Fixes #284.

What was wrong

The profiles of VICTORY_PROFILE=<from>,<to>,<ms>,<file>;… run one after another on one thread, all against the one start time. So with 0,60,5,a.txt;30,90,5,b.txt, b.txt covers 60 to 90 s only, and a window that ends while the one before it still runs wrote a file with rounds 0 and still printed "the profile is in b.txt". Neither case was said anywhere.

What this changes

  • When the switch is read, each window that will begin late is named on stderr with the time it will really cover, and each window that will be over before its turn is named as not made.
  • A window that is over when its turn comes is skipped: no empty file, no "the profile is in" line.
  • The times stay absolute (seconds from the start), as documented; windows that do not overlap behave as before.

The schedule is worked out by a small pure function, begins(&[(from, to)]).

Tested

  • cargo test -p victory-loader --features diagnostics profile (2 pass), with a new test of begins: the issue's example, a window wholly inside the one before it, windows that touch, windows out of order, none.
  • cargo clippy -p victory-loader --lib --features diagnostics --target x86_64-pc-windows-msvc -- -D warnings is clean.
  • Not run on Windows and no profile was taken of a running title. The tests were cross-built for x86_64-pc-windows-gnullvm on Linux and run under Wine 11.22.

AI use

Written with Claude Code; built and tested as above.

🤖 Generated with Claude Code

**@⁠Spetrius** on GitHub · 2026-11-26 20:06 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/321) `Spetrius:fix/profile-window-overlap` → `a-publier` · +51 −0 · 1 files · 1 commits · draft Fixes #284. ## What was wrong The profiles of `VICTORY_PROFILE=<from>,<to>,<ms>,<file>;…` run one after another on one thread, all against the one start time. So with `0,60,5,a.txt;30,90,5,b.txt`, `b.txt` covers 60 to 90 s only, and a window that ends while the one before it still runs wrote a file with `rounds 0` and still printed "the profile is in b.txt". Neither case was said anywhere. ## What this changes - When the switch is read, each window that will begin late is named on stderr with the time it will really cover, and each window that will be over before its turn is named as not made. - A window that is over when its turn comes is skipped: no empty file, no "the profile is in" line. - The times stay absolute (seconds from the start), as documented; windows that do not overlap behave as before. The schedule is worked out by a small pure function, `begins(&[(from, to)])`. ## Tested - `cargo test -p victory-loader --features diagnostics profile` (2 pass), with a new test of `begins`: the issue's example, a window wholly inside the one before it, windows that touch, windows out of order, none. - `cargo clippy -p victory-loader --lib --features diagnostics --target x86_64-pc-windows-msvc -- -D warnings` is clean. - **Not run on Windows and no profile was taken of a running title.** The tests were cross-built for `x86_64-pc-windows-gnullvm` on Linux and run under Wine 11.22. ## AI use Written with Claude Code; built and tested as above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The profiles run one after another on one thread against one start, so
0,60,5,a.txt;30,90,5,b.txt gave b.txt half its window, and a window that
ended while the one before it ran wrote a file of no rounds and said the
profile was in it. When the switch is read, each window that begins late
or not at all is named with the time it will cover; a window that is over
when its turn comes is skipped.

Co-Authored-By: Claude <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:12:50 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-loader/src/profile.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/321/head:github-bot/gh-321'
git switch 'github-bot/gh-321'

Merge

Merge the changes and update on Forgejo.
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-321'
git switch 'github-bot/gh-321'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-321'
git switch 'github-bot/gh-321'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-321'
git switch 'a-publier'
git merge --squash 'github-bot/gh-321'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-321'
git switch 'a-publier'
git merge 'github-bot/gh-321'
git push origin 'a-publier'
This discussion has been locked. Commenting is limited to contributors.
No description provided.