You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix "Unknown Processor" on Windows if WMIC is not present (#2749)
* allow MosCpuDetector to run on .NET 5+
* Revert "allow MosCpuDetector to run on .NET 5+"
This reverts commit 495855a.
* add WmiLightCpu Detector
* Fix WmicCpuDetector being chosen if not available
* enable NativeAOT
* simplify IsApplicable
* Update spacing of SupportedOsPlatform attribute
Co-authored-by: Tim Cassell <[email protected]>
* Revert "Fix WmicCpuDetector being chosen if not available"
This reverts commit 5972f77.
* add WMIC deprecation remarks
* remove WmiLight code
* update WmiCpuInfoParser to return null if Processor Name isn't detected
* remove WmiLightCpuDetector reference from WindowsCpuDetector
* Update WmicCpuInfoParser.cs
* check if wmicOutput is null or empty instead
* add PowershellWmiCpuDetector (parser still not complete)
* return null if there's no version of powershell installed
* fix Powershell 7+ check
Co-authored-by: Tim Cassell <[email protected]>
* rework search statement given that regex isn't supported
* add parser code
* add PowershellWmiCpuDetector to WindowsCpuDetector
* rename variable to lower case
* improve checking of latest powershell 7+ version
* use explicit typing
* fix frequency addition issue
* revert to how WMIC parser handles processor frequency
* add string is null or empty check to WmiCpuDetector
* invoke Powershell as "PowerShell" if the file isn't found
* add nominal Frequency detection and improve max frequency detection
* fix issue with detecting latest Powershell
* update comment
* Update PowershellWmiCpuDetector.cs
* refactor Powershell locating code to PowershellLocator
* simplify frequency checks
* Create PowershellWmiParserTests.cs
* fix null being returned when object is expected.
* rename test
* simplify max frequency check
Co-authored-by: Tim Cassell <[email protected]>
* use """ for string in parser test
* Update PowershellWmiCpuInfoParserTests.cs
* reduce indentation with """
* remove unnecessary test info
* move string null check to caller
* add nominal frequency support for MosCpuDetector
* Update src/BenchmarkDotNet/Detectors/Cpu/Windows/PowershellWmiCpuDetector.cs
Co-authored-by: Tim Cassell <[email protected]>
* remove nullability of parser
Co-authored-by: Tim Cassell <[email protected]>
* check if tempMaxFrequency > 0 before assignment
Co-authored-by: Tim Cassell <[email protected]>
* remove nullability of WmicCpuInfoParser
* use file scoped namespace
* use double instead of int
* add null check to LinuxCpuDetector
* change nullability of LinuxCpuParser
* update LinuxCpuInfoParser nominal and max frequency detection
* Update LinuxCpuInfoParser.cs
* fix nullability check
* simplify nominal frequency comparison
Co-authored-by: Tim Cassell <[email protected]>
* add null check to macOS
* don't accept null string from detector
* fix LinuxCpuInfo parser test issues and improve robustness of Linux Cpu checks
* fix Powershell Wmi Parser parsing issues
* fix .net framework cpu parsing issue
* do implicit conversion to double from uint
---------
Co-authored-by: Tim Cassell <[email protected]>
/// CPU information from output of the `wmic cpu get Name, NumberOfCores, NumberOfLogicalProcessors /Format:List` command.
10
10
/// Windows only.
11
11
/// </summary>
12
+
/// <remarks>WMIC is deprecated by Microsoft starting with Windows 10 21H1 (including Windows Server), and it is not known whether it still ships with Windows by default.
13
+
/// <para>WMIC may be removed in a future version of Windows. See <see href="https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic"/> </para></remarks>
0 commit comments