Browse Source

Don't exclude, just suppress.

pull/2886/head
James Jackson-South 1 year ago
parent
commit
3448ea42f8
  1. 2
      tests/ImageSharp.Benchmarks/Codecs/Bmp/DecodeBmp.cs
  2. 2
      tests/ImageSharp.Benchmarks/Codecs/Bmp/EncodeBmp.cs
  3. 2
      tests/ImageSharp.Benchmarks/Codecs/Bmp/EncodeBmpMultiple.cs
  4. 12
      tests/ImageSharp.Benchmarks/Codecs/Gif/DecodeGif.cs
  5. 2
      tests/ImageSharp.Benchmarks/Codecs/Gif/EncodeGif.cs
  6. 2
      tests/ImageSharp.Benchmarks/Codecs/Gif/EncodeGifMultiple.cs
  7. 3
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpegParseStreamOnly.cs
  8. 2
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpeg_Aggregate.cs
  9. 2
      tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpeg_ImageSpecific.cs
  10. 2
      tests/ImageSharp.Benchmarks/Codecs/MultiImageBenchmarkBase.cs
  11. 2
      tests/ImageSharp.Benchmarks/Codecs/Png/DecodePng.cs
  12. 2
      tests/ImageSharp.Benchmarks/Codecs/Png/EncodePng.cs
  13. 2
      tests/ImageSharp.Benchmarks/Codecs/Tga/DecodeTga.cs
  14. 2
      tests/ImageSharp.Benchmarks/Codecs/Tiff/DecodeTiff.cs
  15. 2
      tests/ImageSharp.Benchmarks/Codecs/Tiff/EncodeTiff.cs
  16. 4
      tests/ImageSharp.Benchmarks/Codecs/Webp/DecodeWebp.cs
  17. 2
      tests/ImageSharp.Benchmarks/Codecs/Webp/EncodeWebp.cs
  18. 2
      tests/ImageSharp.Benchmarks/Color/ColorEquality.cs
  19. 6
      tests/ImageSharp.Benchmarks/Config.cs
  20. 2
      tests/ImageSharp.Benchmarks/LoadResizeSave/LoadResizeSaveStressRunner.cs
  21. 2
      tests/ImageSharp.Benchmarks/Processing/Crop.cs
  22. 2
      tests/ImageSharp.Benchmarks/Processing/Resize.cs

2
tests/ImageSharp.Benchmarks/Codecs/Bmp/DecodeBmp.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Tests;
@ -41,4 +40,3 @@ public class DecodeBmp
return new Size(image.Width, image.Height);
}
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/Bmp/EncodeBmp.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing.Imaging;
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats;
@ -52,4 +51,3 @@ public class EncodeBmp
this.bmpCore.SaveAsBmp(memoryStream);
}
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/Bmp/EncodeBmpMultiple.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing.Imaging;
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Bmp;
@ -29,4 +28,3 @@ public class EncodeBmpMultiple : MultiImageBenchmarkBase.WithImagesPreloaded
return null;
});
}
#endif

12
tests/ImageSharp.Benchmarks/Codecs/Gif/DecodeGif.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Tests;
@ -19,15 +18,9 @@ public class DecodeGif
=> Path.Combine(TestEnvironment.InputImagesDirectoryFullPath, this.TestImage);
[GlobalSetup]
public void ReadImages()
{
if (this.gifBytes == null)
{
this.gifBytes = File.ReadAllBytes(this.TestImageFullPath);
}
}
public void ReadImages() => this.gifBytes ??= File.ReadAllBytes(this.TestImageFullPath);
[Params(TestImages.Gif.Rings)]
[Params(TestImages.Gif.Cheers)]
public string TestImage { get; set; }
[Benchmark(Baseline = true, Description = "System.Drawing Gif")]
@ -46,4 +39,3 @@ public class DecodeGif
return new Size(image.Width, image.Height);
}
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/Gif/EncodeGif.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing.Imaging;
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Gif;
@ -65,4 +64,3 @@ public class EncodeGif
this.bmpCore.SaveAsGif(memoryStream, this.encoder);
}
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/Gif/EncodeGifMultiple.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing.Imaging;
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Gif;
@ -40,4 +39,3 @@ public class EncodeGifMultiple : MultiImageBenchmarkBase.WithImagesPreloaded
return null;
});
}
#endif

3
tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpegParseStreamOnly.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder;
@ -66,7 +65,7 @@ public class DecodeJpegParseStreamOnly
}
}
}
#endif
/*
BenchmarkDotNet=v0.13.0, OS=Windows 10.0.19042.1083 (20H2/October2020Update)
Intel Core i7-6700K CPU 4.00GHz (Skylake), 1 CPU, 8 logical and 4 physical cores

2
tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpeg_Aggregate.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Tests;
@ -38,4 +37,3 @@ public class DecodeJpeg_Aggregate : MultiImageBenchmarkBase
public void SystemDrawing()
=> this.ForEachStream(SDImage.FromStream);
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpeg_ImageSpecific.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Tests;
@ -67,4 +66,3 @@ public class DecodeJpeg_ImageSpecific
| 'Decode Jpeg - ImageSharp' | Jpg/i(...)e.jpg [43] | 276.490 ms | 195.5104 ms | 10.7166 ms | 0.71 | 0.01 | - | - | - | 36022368 B |
*/
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/MultiImageBenchmarkBase.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing;
using System.Numerics;
using BenchmarkDotNet.Attributes;
@ -237,4 +236,3 @@ public abstract class MultiImageBenchmarkBase
}
}
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/Png/DecodePng.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Tests;
@ -41,4 +40,3 @@ public class DecodePng
return image.Size;
}
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/Png/EncodePng.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing.Imaging;
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.Formats.Png;
@ -59,4 +58,3 @@ public class EncodePng
this.bmpCore.SaveAsPng(memoryStream, encoder);
}
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/Tga/DecodeTga.cs

@ -31,7 +31,7 @@ public class DecodeTga
{
MagickReadSettings settings = new() { Format = MagickFormat.Tga };
using MagickImage image = new(new MemoryStream(this.data), settings);
return (int)image.Width;
return image.Width;
}
[Benchmark(Description = "ImageSharp Tga")]

2
tests/ImageSharp.Benchmarks/Codecs/Tiff/DecodeTiff.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
// Enable this for using larger Tiff files. Those files are very large (> 700MB) and therefor not part of the git repo.
// Use the scripts gen_big.ps1 and gen_medium.ps1 in tests\Images\Input\Tiff\Benchmarks to generate those images.
//// #define BIG_TESTS
@ -83,4 +82,3 @@ public class DecodeTiff
return image.Size;
}
}
#endif

2
tests/ImageSharp.Benchmarks/Codecs/Tiff/EncodeTiff.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing.Imaging;
using BenchmarkDotNet.Attributes;
@ -111,4 +110,3 @@ public class EncodeTiff
public static bool IsOneBitCompression(TiffCompression compression)
=> compression is TiffCompression.Ccitt1D or TiffCompression.CcittGroup3Fax or TiffCompression.CcittGroup4Fax;
}
#endif

4
tests/ImageSharp.Benchmarks/Codecs/Webp/DecodeWebp.cs

@ -47,7 +47,7 @@ public class DecodeWebp
MagickReadSettings settings = new() { Format = MagickFormat.WebP };
using MemoryStream memoryStream = new(this.webpLossyBytes);
using MagickImage image = new(memoryStream, settings);
return (int)image.Width;
return image.Width;
}
[Benchmark(Description = "ImageSharp Lossy Webp")]
@ -65,7 +65,7 @@ public class DecodeWebp
{ Format = MagickFormat.WebP };
using MemoryStream memoryStream = new(this.webpLossyBytes);
using MagickImage image = new(memoryStream, settings);
return (int)image.Width;
return image.Width;
}
[Benchmark(Description = "ImageSharp Lossless Webp")]

2
tests/ImageSharp.Benchmarks/Codecs/Webp/EncodeWebp.cs

@ -14,9 +14,7 @@ namespace SixLabors.ImageSharp.Benchmarks.Codecs;
[MarkdownExporter]
[HtmlExporter]
[Config(typeof(Config.Short))]
#pragma warning disable CA1001 // Types that own disposable fields should be disposable
public class EncodeWebp
#pragma warning restore CA1001 // Types that own disposable fields should be disposable
{
private MagickImage webpMagick;
private Image<Rgba32> webp;

2
tests/ImageSharp.Benchmarks/Color/ColorEquality.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats;
using SystemColor = System.Drawing.Color;
@ -18,4 +17,3 @@ public class ColorEquality
public bool ColorEqual()
=> new Rgba32(128, 128, 128, 128).Equals(new Rgba32(128, 128, 128, 128));
}
#endif

6
tests/ImageSharp.Benchmarks/Config.cs

@ -32,7 +32,7 @@ public partial class Config : ManualConfig
public class Standard : Config
{
public Standard() => this.AddJob(
Job.Default.WithRuntime(CoreRuntime.Core80).WithArguments(new Argument[] { new MsBuildArgument("/p:DebugType=portable") }));
Job.Default.WithRuntime(CoreRuntime.Core80).WithArguments([new MsBuildArgument("/p:DebugType=portable")]));
}
public class Short : Config
@ -42,12 +42,10 @@ public partial class Config : ManualConfig
.WithLaunchCount(1)
.WithWarmupCount(3)
.WithIterationCount(3)
.WithArguments(new Argument[] { new MsBuildArgument("/p:DebugType=portable") }));
.WithArguments([new MsBuildArgument("/p:DebugType=portable")]));
}
#if OS_WINDOWS
#pragma warning disable CA1416 // Validate platform compatibility
private bool IsElevated => new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);
#pragma warning restore CA1416 // Validate platform compatibility
#endif
}

2
tests/ImageSharp.Benchmarks/LoadResizeSave/LoadResizeSaveStressRunner.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
@ -346,4 +345,3 @@ public class LoadResizeSaveStressRunner
thumb.Jpegsave(this.OutputPath(input), q: Quality, keep: NetVips.Enums.ForeignKeep.None);
}
}
#endif

2
tests/ImageSharp.Benchmarks/Processing/Crop.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing;
using System.Drawing.Drawing2D;
using BenchmarkDotNet.Attributes;
@ -38,4 +37,3 @@ public class Crop
return new Size(image.Width, image.Height);
}
}
#endif

2
tests/ImageSharp.Benchmarks/Processing/Resize.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
#if OS_WINDOWS
using System.Drawing;
using System.Drawing.Drawing2D;
using BenchmarkDotNet.Attributes;
@ -241,4 +240,3 @@ public class Resize_Bicubic_Compare_Rgba32_Rgb24
[Benchmark]
public void Rgb24() => this.rgb24.ImageSharp_P1();
}
#endif

Loading…
Cancel
Save