feat(patch): Add option to run benchmarks in debug mode#343
feat(patch): Add option to run benchmarks in debug mode#343hassila merged 6 commits intoordo-one:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a --debug-mode flag to the benchmark command plugin, allowing users to run benchmarks in debug mode while keeping the benchmark tool itself built in release mode.
Changes:
- Added
--debug-modecommand-line flag to enable debug mode for benchmark targets - Updated build configuration to use either debug or release mode based on the flag
- Added documentation for the new flag in help text and documentation
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Sources/Benchmark/Documentation.docc/RunningBenchmarks.md | Added documentation for the new --debug-mode flag |
| Plugins/BenchmarkCommandPlugin/BenchmarkPlugin+Help.swift | Added help text for the --debug-mode flag |
| Plugins/BenchmarkCommandPlugin/BenchmarkCommandPlugin.swift | Implemented the debug mode flag extraction and build configuration logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Maybe the logical thing would be to use |
+1 |
|
@hassila @supersonicbyte It seems like |
|
I'd just do both to keep it similar to SwiftPM even if it's not very elegant in code 🙂. |
|
Oh, you are right Having slept on it, I'd probably would go with something Even though it at first glance would be nice to mimic SPM, It might be a bit confusing to see:
which would be a valid command line - the long form would be more distinct:
Simply due to us living in the same command line space as SPM here and the position matters, which can make it a bit unclear. |
|
I agree! |
|
Looks good, thanks for the contribution! |
Description
This adds the option to run benchmarks in debug mode (the benchmark tool is still built in release mode). More specifically, a
--debug-modeflag is added that can be passed to the benchmark tool to build the benchmark targets in debug mode. Default is still release.I'm not precious about the
--debug-modesyntax and I can appreciate this can conflict with the--debugone so I'm happy to change this to something else if needed. I also considered--build-mode {release,debug}How Has This Been Tested?
No tests have been added but happy to add some if needed
Minimal checklist:
DocCcode-level documentation for any public interfaces exported by the package