diff --git a/src/Greenshot.Gfx/app.config b/src/Greenshot.Gfx/app.config index 8fca7d315..b98217257 100644 --- a/src/Greenshot.Gfx/app.config +++ b/src/Greenshot.Gfx/app.config @@ -2,18 +2,6 @@ - - - - - - - - - - - - diff --git a/src/Greenshot.PerformanceTests/App.config b/src/Greenshot.PerformanceTests/App.config index fa3ddd4fe..46b242b0e 100644 --- a/src/Greenshot.PerformanceTests/App.config +++ b/src/Greenshot.PerformanceTests/App.config @@ -5,122 +5,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/src/Greenshot.PerformanceTests/GfxPerformanceShort.cs b/src/Greenshot.PerformanceTests/GfxPerformanceShort.cs new file mode 100644 index 000000000..a986a5e14 --- /dev/null +++ b/src/Greenshot.PerformanceTests/GfxPerformanceShort.cs @@ -0,0 +1,49 @@ +using System.Drawing; +using System.Drawing.Imaging; +using BenchmarkDotNet.Attributes; +using Greenshot.Gfx; +using Greenshot.Gfx.Experimental; + +namespace Greenshot.PerformanceTests +{ + /// + /// This defines the benchmarks which can be done + /// + [MinColumn, MaxColumn, MemoryDiagnoser] + public class GfxPerformanceShort + { + [Benchmark] + [Arguments(PixelFormat.Format24bppRgb)] + [Arguments(PixelFormat.Format32bppRgb)] + [Arguments(PixelFormat.Format32bppArgb)] + public void Blur(PixelFormat pixelFormat) + { + using (var bitmap = BitmapFactory.CreateEmpty(400, 400, pixelFormat, Color.White)) + { + using (var graphics = Graphics.FromImage(bitmap)) + using (var pen = new SolidBrush(Color.Blue)) + { + graphics.FillRectangle(pen, new Rectangle(30, 30, 340, 340)); + } + bitmap.ApplyBoxBlur(10); + } + } + + [Benchmark] + [Arguments(PixelFormat.Format24bppRgb)] + [Arguments(PixelFormat.Format32bppRgb)] + [Arguments(PixelFormat.Format32bppArgb)] + public void BlurSpan(PixelFormat pixelFormat) + { + using (var bitmap = BitmapFactory.CreateEmpty(400, 400, pixelFormat, Color.White)) + { + using (var graphics = Graphics.FromImage(bitmap)) + using (var pen = new SolidBrush(Color.Blue)) + { + graphics.FillRectangle(pen, new Rectangle(30, 30, 340, 340)); + } + bitmap.ApplyBoxBlurSpan(10); + } + } + } +} diff --git a/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj b/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj index 8e8148826..ca7760e3b 100644 --- a/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj +++ b/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj @@ -3,12 +3,21 @@ Greenshot.PerformanceTests Greenshot.PerformanceTests - WinExe + Exe netcoreapp3.0;net471 + + + + + + + + + @@ -47,55 +56,18 @@ - - 0.11.2 - - - 2.3.0 - - - 2.0.4 - - - 1.0.55 - + + + + 2.6.2 runtime; build; native; contentfiles; analyzers all - - 2.9.0 - - - 2.1.0 - - - 4.3.1 - - - 4.3.0 - - - 4.3.0 - - - 4.5.1 - - - 4.3.0 - - - 4.3.1 - - - 4.3.2 - - - 4.5.0 - - - 4.3.1 - + + + + \ No newline at end of file diff --git a/src/Greenshot.PerformanceTests/Program.cs b/src/Greenshot.PerformanceTests/Program.cs index ca01398be..45f6d2e46 100644 --- a/src/Greenshot.PerformanceTests/Program.cs +++ b/src/Greenshot.PerformanceTests/Program.cs @@ -16,7 +16,7 @@ namespace Greenshot.PerformanceTests { var job = Job.Default.With(Platform.X64); var config = DefaultConfig.Instance.With(job).KeepBenchmarkFiles(true); - BenchmarkRunner.Run(config); + BenchmarkRunner.Run(config); Console.ReadLine(); } } diff --git a/src/Greenshot.Tests/Greenshot.Tests.csproj b/src/Greenshot.Tests/Greenshot.Tests.csproj index decaac1cc..230ab2fb3 100644 --- a/src/Greenshot.Tests/Greenshot.Tests.csproj +++ b/src/Greenshot.Tests/Greenshot.Tests.csproj @@ -7,34 +7,15 @@ - - 4.3.1 - - - 4.3.0 - - - 4.3.0 - - - 4.5.1 - - - 4.3.0 - - - 4.3.1 - - - 4.3.2 - - - 4.5.0 - - - 4.3.1 - - + + + + + + + + + @@ -87,53 +68,27 @@ - - 0.11.2 - - - 2.3.0 - - - 2.0.4 - - - 1.1.12-gbfc701fccd - - - 0.9.15 - + + + + + - - 2.6.2 + runtime; build; native; contentfiles; analyzers all - - 2.9.0 - - - 2.1.0 - - - 2.4.1 - - - 2.0.3 - - - 0.10.0 - - - 2.4.1 - - - 2.4.1 + + + + + + + runtime; build; native; contentfiles; analyzers all - - 0.3.5 - +