C
C#5mo ago
Jason_Bjorn

✅ Benchmarks not running

This is my Benchmarks.cs file
using System.Security.Cryptography;
using BenchmarkDotNet.Attributes;

namespace DirectoryDiff;

public class BenchmarksHash
{
[MemoryDiagnoser]
public class GetHashComparison
{
static string testFile1path = @"U:\fdb\2024-07-26 18.48.10.jpg";
static FileInfo testFile1 = new(testFile1path);
static SHA256 sha256 = SHA256.Create();

[Benchmark]
public static void TestHashBytes() => FileUtils.GetFileHashBytes(testFile1, sha256);

[Benchmark]
public static void TestHashString() => FileUtils.GetFileHashString(testFile1, sha256);
}
}
using System.Security.Cryptography;
using BenchmarkDotNet.Attributes;

namespace DirectoryDiff;

public class BenchmarksHash
{
[MemoryDiagnoser]
public class GetHashComparison
{
static string testFile1path = @"U:\fdb\2024-07-26 18.48.10.jpg";
static FileInfo testFile1 = new(testFile1path);
static SHA256 sha256 = SHA256.Create();

[Benchmark]
public static void TestHashBytes() => FileUtils.GetFileHashBytes(testFile1, sha256);

[Benchmark]
public static void TestHashString() => FileUtils.GetFileHashString(testFile1, sha256);
}
}
This is my Program.cs file
using System.Security.Cryptography;
using BenchmarkDotNet.Running;
using DirectoryDiff;

class Program
{
public static void Main()
{
BenchmarkRunner.Run<BenchmarksHash>();
}
}
using System.Security.Cryptography;
using BenchmarkDotNet.Running;
using DirectoryDiff;

class Program
{
public static void Main()
{
BenchmarkRunner.Run<BenchmarksHash>();
}
}
The benchmarks are not running for some reason
No description
1 Reply
Jason_Bjorn
Jason_BjornOP5mo ago
fixed it, needed to call the subclass
Want results from more Discord servers?
Add your server