Browse Source

move ResizeProfilingBenchmarks, use the ***ProfilingBenchmarks naming convention everywhere

af/merge-core
Anton Firszov 8 years ago
parent
commit
903601ecbf
  1. 4
      tests/ImageSharp.Sandbox46/Program.cs
  2. 4
      tests/ImageSharp.Tests/ProfilingBenchmarks/JpegProfilingBenchmarks.cs
  3. 4
      tests/ImageSharp.Tests/ProfilingBenchmarks/LoadResizeSaveProfilingBenchmarks.cs
  4. 11
      tests/ImageSharp.Tests/ProfilingBenchmarks/ResizeProfilingBenchmarks.cs

4
tests/ImageSharp.Sandbox46/Program.cs

@ -63,8 +63,8 @@ namespace SixLabors.ImageSharp.Sandbox46
private static void RunDecodeJpegProfilingTests() private static void RunDecodeJpegProfilingTests()
{ {
Console.WriteLine("RunDecodeJpegProfilingTests..."); Console.WriteLine("RunDecodeJpegProfilingTests...");
var benchmarks = new JpegBenchmarks(new ConsoleOutput()); var benchmarks = new JpegProfilingBenchmarks(new ConsoleOutput());
foreach (object[] data in JpegBenchmarks.DecodeJpegData) foreach (object[] data in JpegProfilingBenchmarks.DecodeJpegData)
{ {
string fileName = (string)data[0]; string fileName = (string)data[0];
benchmarks.DecodeJpeg(fileName); benchmarks.DecodeJpeg(fileName);

4
tests/ImageSharp.Tests/ProfilingBenchmarks/JpegBenchmarks.cs → tests/ImageSharp.Tests/ProfilingBenchmarks/JpegProfilingBenchmarks.cs

@ -15,9 +15,9 @@ using Xunit.Abstractions;
namespace SixLabors.ImageSharp.Tests.ProfilingBenchmarks namespace SixLabors.ImageSharp.Tests.ProfilingBenchmarks
{ {
public class JpegBenchmarks : MeasureFixture public class JpegProfilingBenchmarks : MeasureFixture
{ {
public JpegBenchmarks(ITestOutputHelper output) public JpegProfilingBenchmarks(ITestOutputHelper output)
: base(output) : base(output)
{ {
} }

4
tests/ImageSharp.Tests/ProfilingBenchmarks/LoadResizeSaveBenchmarks.cs → tests/ImageSharp.Tests/ProfilingBenchmarks/LoadResizeSaveProfilingBenchmarks.cs

@ -10,9 +10,9 @@ using Xunit.Abstractions;
namespace SixLabors.ImageSharp.Tests.ProfilingBenchmarks namespace SixLabors.ImageSharp.Tests.ProfilingBenchmarks
{ {
public class LoadResizeSaveBenchmarks : MeasureFixture public class LoadResizeSaveProfilingBenchmarks : MeasureFixture
{ {
public LoadResizeSaveBenchmarks(ITestOutputHelper output) public LoadResizeSaveProfilingBenchmarks(ITestOutputHelper output)
: base(output) : base(output)
{ {
} }

11
tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeProfilingBenchmarks.cs → tests/ImageSharp.Tests/ProfilingBenchmarks/ResizeProfilingBenchmarks.cs

@ -7,17 +7,10 @@ using SixLabors.ImageSharp.Processing;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms namespace SixLabors.ImageSharp.Tests.ProfilingBenchmarks
{ {
public class ResizeProfilingBenchmarks : MeasureFixture public class ResizeProfilingBenchmarks : MeasureFixture
{ {
public const string SkipText =
#if false
null;
#else
"Benchmark, enable manually!";
#endif
private readonly Configuration configuration = Configuration.CreateDefaultInstance(); private readonly Configuration configuration = Configuration.CreateDefaultInstance();
public ResizeProfilingBenchmarks(ITestOutputHelper output) public ResizeProfilingBenchmarks(ITestOutputHelper output)
@ -28,7 +21,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
public int ExecutionCount { get; set; } = 50; public int ExecutionCount { get; set; } = 50;
[Theory(Skip = SkipText)] [Theory(Skip = ProfilingSetup.SkipProfilingTests)]
[InlineData(100, 100)] [InlineData(100, 100)]
[InlineData(2000, 2000)] [InlineData(2000, 2000)]
public void ResizeBicubic(int width, int height) public void ResizeBicubic(int width, int height)
Loading…
Cancel
Save