Skip to content

[Bug] Pointless power plan change #2319

Open
@levicki

Description

@levicki

You should not change power plant to High Performance if it is already Ultimate Performance.

Activity

adamsitnik

adamsitnik commented on Jun 5, 2023

@adamsitnik
Member
levicki

levicki commented on Jun 5, 2023

@levicki
Author

From the brief look at it I am not seeing the problem, must be in the calling code.

Another thing, what happens when user presses Ctrl+C to interrupt test execution? I don't see the code hooking console event handler to restore power plan when process is interrupted?

Absolutely the whole idea of messing with user settings is IMO bad if you don't guarantee they will be restored.

Another scenario -- Windows Update decides to restart the PC while the benchmark is running. Are you intercepting WM_QUERYENDSESSION to stop shutdown or at least restore power plan there?

heron1

heron1 commented on Oct 17, 2023

@heron1

Just had to come here and say as someone that just tried this framework the changing of power plans feels very weird. On my laptop I use balanced, yet when running these tests it changes the profile to performance, which increases my screen brightness (I have custom settings I'd like to retain between the different performance profiles). Is there a reason this is done, that performance profiling cannot be done on the user's current power plan?

added this to the v0.13.x milestone on Dec 11, 2023
added a commit that references this issue on Dec 15, 2023
3437889
linked a pull request that will close this issue on Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @heron1@adamsitnik@levicki

      Issue actions

        [Bug] Pointless power plan change · Issue #2319 · dotnet/BenchmarkDotNet