Skip to content

Add a sweep of the dock's settings to the bench script - #153

Open
RayTrunk wants to merge 1 commit into
SumirSeth:mainfrom
RayTrunk:feat/bench-sweep-v2
Open

RayTrunk wants to merge 1 commit into
SumirSeth:mainfrom
RayTrunk:feat/bench-sweep-v2

Conversation

@RayTrunk

Copy link
Copy Markdown
Contributor

What changed

The second pull request for #44: scripts\bench.ps1 -Sweep, and the docs for both modes.

  • -Sweep builds your checkout and runs its nightly wisp.exe with its own APPDATA and hide_taskbar = true. It goes through 58 configs:

    • every launcher position × autohide × app icon size × gap,
    • the themes and backdrops, a dock color, no search button,
    • turning the dock off and on,
    • values Wisp must clamp or ignore, and broken files it must skip while keeping the last config,
    • each screen with dock_screen = "pointer".
  • Each config is applied the way Settings applies it, by reloading, without restarting Wisp. For each it checks:

    • one dock shows, in the right window,
    • its height and the gap below it match the icon size and gap at the screen's scale,
    • it stays on its screen,
    • the space kept for it is right,
    • a maximized window stays above it,
    • Explorer's taskbar stays hidden and Wisp keeps running.

    With autohide it moves the pointer away and back to check that the dock hides and shows. It also takes a screenshot of the dock.

  • It writes target\bench\sweep\summary.md to paste, and sweep.zip with the screenshots and every measurement. It exits with 1 when a check fails or your config changed.

  • It prints what it will do and asks first (-Yes skips that). Your Wisp is quit and started again at the end, and your config is checked byte for byte afterwards.

  • CONTRIBUTING.md's Performance section now starts with bench.ps1 -Perf and -Sweep. The template's Performance line asks for their summaries.

The sweep lives in scripts\bench-sweep.ps1, which bench.ps1 dot-sources, so bench.ps1 stays readable. Build-Tree moved up so both modes share it.

Why

So a change to the dock or launcher gets checked in every setting, not just the one the contributor uses (#44). It already paid off: its first run found the stale dock picture fixed in #141. On main back then, 20 of 58 configs failed (every centered config and both dock-off ones), and 58 of 58 passed with the fix.

How I verified it

Windows 11 Pro build 26300, two screens side by side (2560×1440 at 125% as the main screen, 1920×1080 at 100%), PowerShell 7. This branch is rebased on 0.9.1 (499528c).

  • Sweep on this branch, 58 of 58:
Summary

Settings sweep (scripts\bench.ps1 -Sweep): feat/bench-sweep-v2 at 499528c with uncommitted changes. 58 configs, 58 passed, 0 failed.

Every check passed. The configs in %APPDATA% were the same byte for byte afterwards.

  • The checks catch real faults. Before Hide the launcher's window when its dock goes away #141, main failed 18 centered configs ("one dock": the old dock stayed on the launcher's window) and both dock-off configs. A check that fails makes the script exit with 1.
  • cargo fmt --all --check, both clippy runs and cargo test --workspace pass. Nothing in src changed.

Performance

Not affected: scripts and docs only.

Not tested

  • One screen, Windows 10, and Windows PowerShell 5.1 for this version. PR 1 ran on both PowerShells.
  • dock_edge from Feat/configurable dock edge #142. Once that's merged, the sweep should get left and right too.
  • Over several runs, "dock shown" failed now and then for an autohide config: 2 of 58 in one run, 4 in another, 0 in the next run each time, and never the same config twice. I couldn't reproduce it on its own (12 of 12 shown within 120 ms). My guess is the window that comes to the front after the sweep hides its own maximize window, but I haven't confirmed that. So the failure now names the foreground window's class and place, which should show the cause the next time it happens. If you see it, rerun before suspecting the change.

Fixes #44.

  • I understand every line of this change and tested a build of it.
  • fmt, both clippy runs and the tests pass.
  • CHANGELOG.md has an entry under Unreleased, or this has nothing users notice.

🤖 Generated with Claude Code

scripts\bench.ps1 -Sweep builds the checkout and runs its nightly
wisp.exe with its own APPDATA and hide_taskbar on. It goes through every
launcher position x autohide x app icon size x gap, the themes and
backdrops, values Wisp must clamp or ignore, and each screen. For each
it checks the dock's height and gap, the space kept for it, that a
maximized window stays above it and that Explorer's taskbar stays
hidden, and takes a screenshot. It writes a summary and a zip for the
pull request, and exits 1 when a check fails or the user's config
changed.

CONTRIBUTING.md's performance steps now use bench.ps1 -Perf and -Sweep,
and the pull request template asks for their summaries.

Part of SumirSeth#44.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Add a benchmark and settings sweep script for pull requests

1 participant