public void StartTest(LibraryInUse.WhichLibrary library) { DateTime startTime; int totalSourceSize; int totalTargetSize; long totalMemoryUsed; long startWorkingSet; SetupStatsCollection(out startTime, out totalSourceSize, out totalTargetSize, out totalMemoryUsed, out startWorkingSet); if (library == LibraryInUse.WhichLibrary.Dotnet) { TestDotnet(ref totalSourceSize, ref totalTargetSize); } else if (library == LibraryInUse.WhichLibrary.Leadtools) { TestLeadtools(ref totalSourceSize, ref totalTargetSize); } else if (library == LibraryInUse.WhichLibrary.Atalasoft) { TestAtalasoft(ref totalSourceSize, ref totalTargetSize); } else if (library == LibraryInUse.WhichLibrary.ImageMagick) { TestImageMagick(ref totalSourceSize, ref totalTargetSize); } TimeSpan timeTaken = GetStats(startTime, ref totalMemoryUsed, startWorkingSet); GetSummary(totalSourceSize, totalTargetSize, totalMemoryUsed, timeTaken); WriteToExcel(library.ToString(), totalSourceSize.ToString(), totalTargetSize.ToString(), (totalSourceSize - totalTargetSize).ToString(), totalMemoryUsed.ToString(), timeTaken.TotalSeconds.ToString(), _operation.ToString()); }