Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing Ctrl-C does not reset power plan back #2483

Closed
xPaw opened this issue Dec 11, 2023 · 0 comments · Fixed by #2661
Closed

Pressing Ctrl-C does not reset power plan back #2483

xPaw opened this issue Dec 11, 2023 · 0 comments · Fixed by #2661
Milestone

Comments

@xPaw
Copy link

xPaw commented Dec 11, 2023

Also mentioned here: #2319 (comment)

  1. Start benchmark
  2. Wait for power plan to change to high performance
  3. Press Ctrl-C

Benchmark exits, but the power plan remains set to high performance. Using v0.13.10.

leonvandermeer added a commit to leonvandermeer/BenchmarkDotNet that referenced this issue Oct 27, 2024
Set ConsoleCancelEventArgs.Cancel to true so that Benchmark process
continues and PowerPlan is reverted at end of aborted Benchmark.
leonvandermeer added a commit to leonvandermeer/BenchmarkDotNet that referenced this issue Oct 28, 2024
…t#2483

Set ConsoleCancelEventArgs.Cancel to true so that Benchmark process
continues and PowerPlan is reverted at end of aborted Benchmark.
leonvandermeer added a commit to leonvandermeer/BenchmarkDotNet that referenced this issue Nov 2, 2024
…otnet#2483

* PowerManagementApplier and ConsoleTitler system state is now reverted at
  Process termination.
* To prevent code duplication, DisposeAtProcessTermination class is
  introduced.
timcassell pushed a commit that referenced this issue Nov 7, 2024
…#2661)

* Ensure revert of system state at Benchmark Process termination, fixes #2483

* PowerManagementApplier and ConsoleTitler system state is now reverted at
  Process termination.
* To prevent code duplication, DisposeAtProcessTermination class is
  introduced.

* Apply suggestions from code review and add documentation
@timcassell timcassell added this to the v0.14.1 milestone Nov 7, 2024
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 a pull request may close this issue.

3 participants