Show / Hide Table of Contents

Power Plans

BenchmarkDotNet forces Windows OS to execute on the High-Performance power plan. You can disable this feature by modify PowerPlanMode property. You can see it in the Sample: IntroPowerPlan.

Please note. During an execution, BenchmarkDotNet saves the current power plan and applies it according to the PowerPlanMode property. When all of the benchmarks finish, a previous power plan comes back. However, if someone killed process or energy was plugged off, we could stay with the High-Performance power plan. In this situation, we should return it manually in Windows Control Panel or by powercfg command.

Links

  • Power policy settings: https://docs.microsoft.com/en-us/windows/desktop/power/power-policy-settings
  • Powercfg command: https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options
  • Sample: IntroPowerPlan

  • Improve this Doc
In This Article
Back to top Copyright © 2013–2021 .NET Foundation and contributors