Completely removed GDI
This commit is contained in:
parent
ddf47ad51b
commit
d76e133f18
31 changed files with 236 additions and 2592 deletions
|
|
@ -40,7 +40,7 @@ public class StressTestBenchmark
|
|||
|
||||
Console.WriteLine($"[STRESS TEST] Generating {ImageCount} test images...");
|
||||
Console.WriteLine("This may take several minutes depending on your hardware.");
|
||||
|
||||
|
||||
// Use smaller images for stress test to save space and time
|
||||
TestImageGenerator.GenerateTestImages(_sourceDirectory, ImageCount, width: 1920, height: 1080);
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ public class StressTestBenchmark
|
|||
});
|
||||
|
||||
var logger = loggerFactory.CreateLogger<ImageCreationService>();
|
||||
var imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorGDI>();
|
||||
var imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorImageSharp>();
|
||||
|
||||
_picSettings = new PicSettings
|
||||
{
|
||||
|
|
@ -75,7 +75,7 @@ public class StressTestBenchmark
|
|||
Trasparenza = 100
|
||||
};
|
||||
|
||||
var imageCreatorService = new ImageCreatorGDI(_picSettings, imageCreatorLogger);
|
||||
var imageCreatorService = new ImageCreatorImageSharp(_picSettings, imageCreatorLogger);
|
||||
_imageCreationStuff = new ImageCreationService(logger, _picSettings, imageCreatorService);
|
||||
|
||||
Console.WriteLine($"[STRESS TEST] Setup complete. Ready to process {ImageCount} images.");
|
||||
|
|
@ -130,12 +130,12 @@ public class StressTestBenchmark
|
|||
|
||||
var results = new ConcurrentBag<string>();
|
||||
var startTime = DateTime.Now;
|
||||
|
||||
|
||||
await _imageCreationStuff.ProcessImagesParallel(options, results, null, CancellationToken.None);
|
||||
|
||||
|
||||
var duration = DateTime.Now - startTime;
|
||||
var throughput = ImageCount / duration.TotalSeconds;
|
||||
|
||||
|
||||
Console.WriteLine($"[STRESS TEST] Processed {results.Count}/{ImageCount} images in {duration.TotalSeconds:F2}s");
|
||||
Console.WriteLine($"[STRESS TEST] Throughput: {throughput:F2} images/second");
|
||||
}
|
||||
|
|
@ -160,12 +160,12 @@ public class StressTestBenchmark
|
|||
|
||||
var results = new ConcurrentBag<string>();
|
||||
var startTime = DateTime.Now;
|
||||
|
||||
|
||||
await _imageCreationStuff.ProcessImagesParallel(options, results, null, CancellationToken.None);
|
||||
|
||||
|
||||
var duration = DateTime.Now - startTime;
|
||||
var throughput = ImageCount / duration.TotalSeconds;
|
||||
|
||||
|
||||
Console.WriteLine($"[STRESS TEST] Processed {results.Count}/{ImageCount} images in {duration.TotalSeconds:F2}s");
|
||||
Console.WriteLine($"[STRESS TEST] Throughput: {throughput:F2} images/second");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue