Add image processing benchmarks and UI folder open buttons
- Added MaddoShared.Benchmarks project with BenchmarkDotNet for comprehensive image processing performance tests (parallel, chunk, size, stress). - Included helper for generating test images and custom configs to ensure InProcess toolchain for .NET Windows compatibility. - Added cross-platform scripts to run benchmarks easily. - Updated .gitignore for benchmark artifacts and temp files. - Exposed GetFilesToProcessPublic in ImageCreationStuff for testability. - Added file name sanitization in ImageCreatorSharp to prevent IO errors. - Enhanced WinForms UI: added "Open" buttons for source/destination folders, handled folder opening in Explorer, and improved user messaging and layout. - Updated solution file to include new benchmark project.
This commit is contained in:
parent
39b0904a72
commit
c2fd4bf780
17 changed files with 1608 additions and 301 deletions
35
MaddoShared.Benchmarks/Program.cs
Normal file
35
MaddoShared.Benchmarks/Program.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Running;
|
||||
using BenchmarkDotNet.Toolchains.InProcess.Emit;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace MaddoShared.Benchmarks;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Check if --job argument is provided
|
||||
bool hasJobArg = args.Any(a => a.Contains("--job"));
|
||||
|
||||
if (hasJobArg)
|
||||
{
|
||||
Console.WriteLine("Note: Overriding --job argument to use InProcess toolchain");
|
||||
Console.WriteLine("This is required to avoid net10.0 vs net10.0-windows compatibility issues.");
|
||||
Console.WriteLine();
|
||||
|
||||
// Remove --job arguments and add our own InProcess config
|
||||
args = args.Where(a => !a.StartsWith("--job") && a != "dry" && a != "short").ToArray();
|
||||
}
|
||||
|
||||
// Create configuration that always uses InProcess toolchain
|
||||
var config = DefaultConfig.Instance
|
||||
.WithOptions(ConfigOptions.DisableOptimizationsValidator)
|
||||
.WithOptions(ConfigOptions.KeepBenchmarkFiles);
|
||||
|
||||
// Run benchmarks - each class has [Config(typeof(InProcessConfig))] which provides InProcess toolchain
|
||||
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue