Skip to content

Commit

Permalink
Merge pull request #26 from OudomMunint/feature
Browse files Browse the repository at this point in the history
PR: Feature => Master
  • Loading branch information
OudomMunint authored Feb 21, 2024
2 parents 2fd757e + 677aa81 commit 2a508db
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ jobs:
if: matrix.os == 'windows-latest'
uses: ncipollo/[email protected]
with:
tag: v1.4.7
tag: v1.4.7.1
4 changes: 3 additions & 1 deletion Benchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -9,6 +9,8 @@

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="SharpDX" Version="4.2.0" />
<PackageReference Include="SharpDX.Direct3D11" Version="4.2.0" />
</ItemGroup>

</Project>
20 changes: 17 additions & 3 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
using System.Management;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using SharpDX.Direct3D11;
using SharpDX.DXGI;
using SharpDX.Direct3D;
using System;
using Device = SharpDX.Direct3D11.Device;

Console.WriteLine("Welcome to the best benchmark in the entire universe");
Console.WriteLine("-----------------------------------------------------------");
Expand Down Expand Up @@ -105,16 +111,24 @@
Console.WriteLine("Name: {0}", item["Name"]);
Console.WriteLine("Manufacturer: {0}", manufacturer);
Console.WriteLine("Driver Version: {0}", item["DriverVersion"]);
Console.WriteLine("VRAM: {0}MB", Convert.ToUInt64(item["AdapterRAM"]) / (1024 * 1024));
}
}
}

using (var factory = new Factory1())
{
using (var adapter = factory.GetAdapter(0))
{
var desc = adapter.Description;
Console.WriteLine("Total VRAM: {0}MB", desc.DedicatedVideoMemory / (1024 * 1024));
Console.WriteLine("-----------------------------------------------------------");
}
}
}
}

Console.Write("Continue to benchmark? (y/n): ");
var input = Console.ReadLine();
if (input.ToLower() == "y")
if (string.Equals("y", "Y"))
{

Console.WriteLine("Choose a benchmark to run:");
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
- For `VSCode` you also need to create `launch.JSON` and `task.JSON` files if you want to run in different configurations.
- If not you can use the provided JSON files.

# Running the EXE
- Open the solution with preferred IDE
- Set the startup project to `Benchmark`
- Build with `dotnet build -c Release`
- Publish with `dotnet publish -c Release`
- Run `Benchmark.exe` in the `C:\Users\<Path to project>\Benchmark\bin\Release\net8.0\publish\` folder.

# Required SDKs
- .NET 8.0.2 from <a href="https://dotnet.microsoft.com/download/dotnet/8.0"> `here` </a>

# Output
<table>
<tr>
Expand Down

0 comments on commit 2a508db

Please sign in to comment.