Skip to content

feat: Add RAM Frequency and Type to Environment Summary (#3041) - #3281

Open
cloudsealed wants to merge 7 commits into
dotnet:masterfrom
cloudsealed:feature/issue-3041
Open

cloudsealed wants to merge 7 commits into
dotnet:masterfrom
cloudsealed:feature/issue-3041

Conversation

@cloudsealed

Copy link
Copy Markdown
Contributor

Fixes #3041

Description

This PR implements the community-requested feature to read and display RAM frequency (MHz) and memory type (e.g., DDR4) in the environment summary.

It updates PhysicalMemoryInfo to parse WMI (Win32_PhysicalMemory) on Windows and /usr/sbin/dmidecode on Linux.

Testing

  • Added PhysicalMemoryInfoTests to validate memory info parsing without allocations.
  • dotnet test passed 100% on net10.0 and net8.0.
  • Zero-allocation logic using fast type parsing.

Comment thread src/BenchmarkDotNet/Environments/PhysicalMemoryInfo.cs
Comment thread src/BenchmarkDotNet/Environments/PhysicalMemoryInfo.cs Outdated
Comment thread src/BenchmarkDotNet/Environments/PhysicalMemoryInfo.cs Outdated
Comment thread src/BenchmarkDotNet/Environments/PhysicalMemoryInfo.cs Outdated
Comment thread src/BenchmarkDotNet/Environments/PhysicalMemoryInfo.cs Outdated

@timcassell timcassell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you implement it for MacOS also?

return null;
}

private static (long? FrequencyMHz, string? MemoryType) GetLinuxOrWindowsMemoryDetails()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this should be 2 separate methods.

This branch has not been deployed

No deployments
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 this pull request may close these issues.

Feature: Add RAM Frequency and Type to Environment Summary

3 participants