Renamed image creators

This commit is contained in:
MaddoScientisto 2026-02-21 15:53:52 +01:00
commit c70ab9e5de
12 changed files with 50 additions and 50 deletions

View file

@ -22,7 +22,7 @@ public class ChunkSizeBenchmarks
{
private string _sourceDirectory;
private string _destinationDirectory;
private ImageCreationStuff _imageCreationStuff;
private ImageCreationService _imageCreationStuff;
private PicSettings _picSettings;
[Params(100)]
@ -49,8 +49,8 @@ public class ChunkSizeBenchmarks
builder.SetMinimumLevel(LogLevel.Warning);
});
var logger = loggerFactory.CreateLogger<ImageCreationStuff>();
var imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorSharp>();
var logger = loggerFactory.CreateLogger<ImageCreationService>();
var imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorGDI>();
_picSettings = new PicSettings
{
@ -75,8 +75,8 @@ public class ChunkSizeBenchmarks
Trasparenza = 100
};
var imageCreatorService = new ImageCreatorSharp(_picSettings, imageCreatorLogger);
_imageCreationStuff = new ImageCreationStuff(logger, _picSettings, imageCreatorService);
var imageCreatorService = new ImageCreatorGDI(_picSettings, imageCreatorLogger);
_imageCreationStuff = new ImageCreationService(logger, _picSettings, imageCreatorService);
}
[GlobalCleanup]
@ -109,7 +109,7 @@ public class ChunkSizeBenchmarks
[Benchmark]
public async Task ProcessWithVariableChunkSize()
{
var options = new ImageCreationStuff.Options
var options = new ImageCreationService.Options
{
SourcePath = _sourceDirectory,
DestinationPath = _destinationDirectory,

View file

@ -22,10 +22,10 @@ public class ImageProcessingBenchmarks
{
private string _sourceDirectory;
private string _destinationDirectory;
private ImageCreationStuff _imageCreationStuff;
private ImageCreationService _imageCreationStuff;
private PicSettings _picSettings;
private ILogger<ImageCreationStuff> _logger;
private ILogger<ImageCreatorSharp> _imageCreatorLogger;
private ILogger<ImageCreationService> _logger;
private ILogger<ImageCreatorGDI> _imageCreatorLogger;
[Params(10, 50, 100)]
public int ImageCount { get; set; }
@ -54,8 +54,8 @@ public class ImageProcessingBenchmarks
builder.SetMinimumLevel(LogLevel.Warning); // Reduce noise during benchmarks
});
_logger = loggerFactory.CreateLogger<ImageCreationStuff>();
_imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorSharp>();
_logger = loggerFactory.CreateLogger<ImageCreationService>();
_imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorGDI>();
// Setup PicSettings with default values
_picSettings = new PicSettings
@ -81,8 +81,8 @@ public class ImageProcessingBenchmarks
Trasparenza = 100
};
var imageCreatorService = new ImageCreatorSharp(_picSettings, _imageCreatorLogger);
_imageCreationStuff = new ImageCreationStuff(_logger, _picSettings, imageCreatorService);
var imageCreatorService = new ImageCreatorGDI(_picSettings, _imageCreatorLogger);
_imageCreationStuff = new ImageCreationService(_logger, _picSettings, imageCreatorService);
}
[GlobalCleanup]
@ -117,7 +117,7 @@ public class ImageProcessingBenchmarks
[Benchmark(Description = "Process images in parallel with chunking")]
public async Task ProcessImagesParallelWithChunks()
{
var options = new ImageCreationStuff.Options
var options = new ImageCreationService.Options
{
SourcePath = _sourceDirectory,
DestinationPath = _destinationDirectory,
@ -139,7 +139,7 @@ public class ImageProcessingBenchmarks
[Benchmark(Description = "Process images in parallel without chunking")]
public async Task ProcessImagesParallelWithoutChunks()
{
var options = new ImageCreationStuff.Options
var options = new ImageCreationService.Options
{
SourcePath = _sourceDirectory,
DestinationPath = _destinationDirectory,
@ -161,7 +161,7 @@ public class ImageProcessingBenchmarks
[Benchmark(Description = "Process images linearly")]
public async Task ProcessImagesLinear()
{
var options = new ImageCreationStuff.Options
var options = new ImageCreationService.Options
{
SourcePath = _sourceDirectory,
DestinationPath = _destinationDirectory,

View file

@ -22,7 +22,7 @@ public class ImageSizeBenchmarks
{
private string _sourceDirectory;
private string _destinationDirectory;
private ImageCreationStuff _imageCreationStuff;
private ImageCreationService _imageCreationStuff;
private PicSettings _picSettings;
[Params(50)]
@ -58,8 +58,8 @@ public class ImageSizeBenchmarks
builder.SetMinimumLevel(LogLevel.Warning);
});
var logger = loggerFactory.CreateLogger<ImageCreationStuff>();
var imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorSharp>();
var logger = loggerFactory.CreateLogger<ImageCreationService>();
var imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorGDI>();
_picSettings = new PicSettings
{
@ -84,8 +84,8 @@ public class ImageSizeBenchmarks
Trasparenza = 100
};
var imageCreatorService = new ImageCreatorSharp(_picSettings, imageCreatorLogger);
_imageCreationStuff = new ImageCreationStuff(logger, _picSettings, imageCreatorService);
var imageCreatorService = new ImageCreatorGDI(_picSettings, imageCreatorLogger);
_imageCreationStuff = new ImageCreationService(logger, _picSettings, imageCreatorService);
}
private static (int width, int height) GetDimensions(ImageSize size)
@ -130,7 +130,7 @@ public class ImageSizeBenchmarks
[Benchmark]
public async Task ProcessDifferentImageSizes()
{
var options = new ImageCreationStuff.Options
var options = new ImageCreationService.Options
{
SourcePath = _sourceDirectory,
DestinationPath = _destinationDirectory,

View file

@ -22,7 +22,7 @@ public class StressTestBenchmark
{
private string _sourceDirectory;
private string _destinationDirectory;
private ImageCreationStuff _imageCreationStuff;
private ImageCreationService _imageCreationStuff;
private PicSettings _picSettings;
[Params(500, 1000)]
@ -49,8 +49,8 @@ public class StressTestBenchmark
builder.SetMinimumLevel(LogLevel.Warning);
});
var logger = loggerFactory.CreateLogger<ImageCreationStuff>();
var imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorSharp>();
var logger = loggerFactory.CreateLogger<ImageCreationService>();
var imageCreatorLogger = loggerFactory.CreateLogger<ImageCreatorGDI>();
_picSettings = new PicSettings
{
@ -75,8 +75,8 @@ public class StressTestBenchmark
Trasparenza = 100
};
var imageCreatorService = new ImageCreatorSharp(_picSettings, imageCreatorLogger);
_imageCreationStuff = new ImageCreationStuff(logger, _picSettings, imageCreatorService);
var imageCreatorService = new ImageCreatorGDI(_picSettings, imageCreatorLogger);
_imageCreationStuff = new ImageCreationService(logger, _picSettings, imageCreatorService);
Console.WriteLine($"[STRESS TEST] Setup complete. Ready to process {ImageCount} images.");
}
@ -113,7 +113,7 @@ public class StressTestBenchmark
[Benchmark(Description = "Stress test with optimal settings")]
public async Task StressTestOptimalSettings()
{
var options = new ImageCreationStuff.Options
var options = new ImageCreationService.Options
{
SourcePath = _sourceDirectory,
DestinationPath = _destinationDirectory,
@ -143,7 +143,7 @@ public class StressTestBenchmark
[Benchmark(Description = "Stress test with aggressive memory management")]
public async Task StressTestAggressiveMemoryManagement()
{
var options = new ImageCreationStuff.Options
var options = new ImageCreationService.Options
{
SourcePath = _sourceDirectory,
DestinationPath = _destinationDirectory,