Skip to content

Commit

Permalink
Merge pull request #51 from OudomMunint/feature
Browse files Browse the repository at this point in the history
Feature => Master
  • Loading branch information
OudomMunint authored Apr 20, 2024
2 parents 2cbe0c0 + b22d60e commit 806fd22
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ jobs:
if: matrix.os == 'windows-latest'
uses: ncipollo/[email protected]
with:
tag: v1.4.9
tag: v1.4.9.1
21 changes: 19 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Hardware.Info;
using NvAPIWrapper.DRS.SettingValues;
using System.Linq;
using System.Net.NetworkInformation;

Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("Welcome to the best benchmark in the entire universe");
Expand All @@ -24,6 +25,7 @@

if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
Console.ForegroundColor = ConsoleColor.Cyan;
var startInfo = new ProcessStartInfo
{
FileName = "/usr/sbin/system_profiler",
Expand All @@ -38,8 +40,11 @@
while (!process.StandardOutput.EndOfStream)
{
string? line = process.StandardOutput.ReadLine();
//Exclusions
if (line != null && !line.Contains("Serial Number (system):") && !line.Contains("Hardware UUID:") && !line.Contains("Model Number:") && !line.Contains("Provisioning UDID:") && !line.Contains("Boot Volume:")
&& !line.Contains("Boot Mode:") && !line.Contains("Computer Name:") && !line.Contains("User Name:"))
&& !line.Contains("Boot Mode:") && !line.Contains("Computer Name:") && !line.Contains("User Name:") && !line.Contains("Kernel Version: Darwin") && !line.Contains("Secure Virtual Memory: Enabled")
&& !line.Contains("System Integrity Protection: Enabled") && !line.Contains("Time since boot:") && !line.Contains("System Firmware Version:") && !line.Contains("OS Loader Version:")
&& !line.Contains("Activation Lock Status:") && !line.Contains("Bus: Built-In") && !line.Contains("Vendor:"))
{
Console.WriteLine(line);
}
Expand Down Expand Up @@ -75,10 +80,22 @@
Console.WriteLine(item["NumberOfLogicalProcessors"]);

Check warning on line 80 in Program.cs

View workflow job for this annotation

GitHub Actions / Build (windows-latest)

This call site is reachable on all platforms. 'ManagementBaseObject.this[string]' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Check warning on line 80 in Program.cs

View workflow job for this annotation

GitHub Actions / Build (macos-latest)

This call site is reachable on all platforms. 'ManagementBaseObject.this[string]' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

Console.ForegroundColor = ConsoleColor.White;
Console.Write("Clock Speed: ");
Console.Write("Base Frequency: ");
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("{0}MHz", item["MaxClockSpeed"]);

Check warning on line 85 in Program.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest)

This call site is reachable on all platforms. 'ManagementBaseObject.this[string]' is only supported on: 'windows'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)

IHardwareInfo hardwareInfo;
hardwareInfo = new HardwareInfo();
hardwareInfo.RefreshAll();
Console.ForegroundColor = ConsoleColor.White;
Console.Write("Current Frequency: ");
Console.ForegroundColor = ConsoleColor.Yellow;

foreach (var cpu in hardwareInfo.CpuList)
{
Console.WriteLine("{0}MHz", cpu.CurrentClockSpeed);
}

Console.ForegroundColor = ConsoleColor.White;
Console.Write("L2 Cache: ");
Console.ForegroundColor = ConsoleColor.Yellow;
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- You can run a Hashing benchmark with MD5, SHA256 and SHA512.
- Or a single thread and multi thread benchmark.
- Or a encrypt/decrypt benchmark (May need admin privileges)
- Using <a href="https://github.com/dotnet/BenchmarkDotNet"> `BenchmarkDotNet` </a>, `SharpDX` and `NvAPIWrapper`.
- Using <a href="https://github.com/dotnet/BenchmarkDotNet"> `BenchmarkDotNet` </a>, `SharpDX`, `NvAPIWrapper` and `Hardware.info`

# Maintenance

Expand Down Expand Up @@ -172,12 +172,17 @@ Intel Core i7-12800H CPU 1.80GHz (Alder Lake), 1 CPU, 20 logical and 14 physical

## .NET 8 Ranking:

Testing...
1. Dell latitude 5531 - i7-12700H @ 55W `32s`
2. MacBook Pro 14" 2023 - M2 Pro 10 Core CPU (6P + 4E) `35s`
3. MacBook Pro 16" 2021 - M1 Max 10 Core CPU (8P + 2E) `42s`
4. Desktop - i7-8700K @ 4.7ghz `105s`
5. MacBook Pro 15" 2018 - i7-8850H @ 45W `133s`
6. MacBook Pro 13" 2017 - i5-7660U @ 15W `401s`

# Minimum system requirements

- .NET 8.0.2
- Dual core CPU
- Windows 10 or MacOS 12
- 4GB RAM
- 1GB Storage
- 1GB Storage

0 comments on commit 806fd22

Please sign in to comment.