Skip to content

refactor(benchmarks): Spectre.Console CLI + project restructure#23

Merged
migus88 merged 2 commits into
masterfrom
refactor/benchmarks-project
Jun 24, 2026
Merged

refactor(benchmarks): Spectre.Console CLI + project restructure#23
migus88 merged 2 commits into
masterfrom
refactor/benchmarks-project

Conversation

@migus88

@migus88 migus88 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

Tidies up the Migs.MPath.Benchmarks project and modernizes how it's run.

  • Spectre.Console.Cli front endProgram.cs is now a thin CommandApp; the old if/else argument chain is gone. Commands live in Commands/ (benchmark, render, info), with auto-generated --help and friendly validation errors.
  • Reorganized layout:
    • Suites/ — the BenchmarkDotNet [Benchmark] classes
    • Competitors/ — rival A* library adapters (IMazeBenchmarkRunner); was MazeBenchmarks/
    • Common/ — shared BenchmarkAgent + BenchmarkScenario (maze path + canonical start/destination)
  • CWD-independentBenchmarkScenario resolves the maze and Results/ paths against the assembly base directory, so every command works from any working directory (previously debug/render only worked from inside the project folder).
  • Re-enabled competitor maze benchmarks (RoyT, AStarLite, LinqToAStar).
  • Added a reachability suite (ReachabilityBenchmarkRunner) benchmarking Pathfinder.GetReachable across small/medium/large budgets.
  • Rider run configs fixed — removed the stale Atomic.Pathfinding (pre-rename) build method and obsolete configs, added a Benchmark Reachability config, and corrected a stale .idea .iml ignore entry.
  • Misc: fixed the RoyTAStarMazeB*u*nchmarkRunner.cs filename typo, dropped the stale cavern.gif csproj reference, suppressed a benign transitive-package TFM warning.

⚠️ Merge order / dependency

ReachabilityBenchmarkRunner calls Pathfinder.GetReachable, which is not on master yet (it ships in the separate GetReachable PR). This branch will not build until GetReachable lands, so CI here is expected to be red until then. Everything else in the restructure compiles cleanly — the only build errors are the three GetReachable references.

Test status

  • Full solution builds except the documented GetReachable references.
  • The benchmark suites, CLI commands, and renderers were exercised locally on top of the GetReachable feature and run correctly.

🤖 Generated with Claude Code

migus88 and others added 2 commits June 24, 2026 22:24
Tidy up the benchmarks project and modernize its command-line entry point.

- Replace the if/else argument chain in Program.cs with a Spectre.Console.Cli
  CommandApp; commands live in Commands/ (benchmark, render, info)
- Reorganize files: Suites/ (BenchmarkDotNet classes), Competitors/ (rival A*
  library adapters, was MazeBenchmarks/), Common/ (shared BenchmarkAgent +
  BenchmarkScenario)
- Rename Agent -> BenchmarkAgent; centralize the maze path and canonical
  start/destination in BenchmarkScenario, resolved against the assembly base
  directory so every command works from any working directory
- Re-enable the competitor maze benchmarks (RoyT, AStarLite, LinqToAStar)
- Add a ReachabilityBenchmarkRunner suite for Pathfinder.GetReachable
- Fix the stale Rider run configs (drop the removed Atomic.Pathfinding build
  method and obsolete configs; add a Benchmark Reachability config)
- Fix the RoyTAStarMazeBunchmarkRunner.cs filename typo and drop the stale
  cavern.gif csproj reference

NOTE: ReachabilityBenchmarkRunner depends on Pathfinder.GetReachable, which is
not on master yet. This branch will not build until the GetReachable PR lands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve the MazeBenchmarkRunner.cs conflict by keeping the restructured Suites/
version with the competitor benchmarks enabled (master had commented them out in
the now-relocated file). Brings in GetReachable, so ReachabilityBenchmarkRunner
compiles and the whole solution builds again.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@migus88 migus88 merged commit 15a3d5f into master Jun 24, 2026
1 check passed
@migus88 migus88 deleted the refactor/benchmarks-project branch June 24, 2026 20:00
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.

1 participant