diff --git a/Paramore.Brighter.Perf/Benchmark.cs b/Paramore.Brighter.Perf/Benchmark.cs deleted file mode 100644 index 9a0cf324d7..0000000000 --- a/Paramore.Brighter.Perf/Benchmark.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using BenchmarkDotNet.Attributes; - -namespace Paramore.Brighter.Perf -{ - public class Benchmark - { - private readonly JsonMessageMapper _jsonMessageMapper; - private readonly JsonMessageMapper2 _mapper2; - private readonly Message _message; - private readonly TestCommand _testCommand; - - public Benchmark() - { - RequestContext requestContext = new RequestContext(); - _jsonMessageMapper = new JsonMessageMapper(requestContext); - _mapper2 = new JsonMessageMapper2(requestContext); - - DateTime dateTime = DateTime.UtcNow; - _testCommand = new TestCommand - { - Message = "This is a message", - Number = 999, - DateNow = dateTime - }; - - string body = - "{\"message\":\"This is a message\",\"number\":999,\"dateNow\":\"2019-04-09T15:06:56.7623017Z\",\"id\":\"7d9120b9-a18e-43ac-a63e-8201a43ea623\"}"; - Guid correlationId = Guid.NewGuid(); - _message = new Message( - new MessageHeader(new Guid("7d9120b9-a18e-43ac-a63e-8201a43ea623"), "Blah", MessageType.MT_COMMAND, - correlationId), new MessageBody(body)); - } - - [Benchmark] - public void MapToMessageJsonByte() - { - _jsonMessageMapper.MapToMessage(_testCommand); - } - - [Benchmark] - public void MapFromMessageJsonByte() - { - _jsonMessageMapper.MapToRequest(_message); - } - - [Benchmark] - public void MapToMessageJsonString() - { - _mapper2.MapToMessage(_testCommand); - } - - [Benchmark] - public void MapFromMessageJsonString() - { - _mapper2.MapToRequest(_message); - } - } -} diff --git a/Paramore.Brighter.Perf/Paramore.Brighter.Perf.csproj b/Paramore.Brighter.Perf/Paramore.Brighter.Perf.csproj deleted file mode 100644 index 11cf14ec7e..0000000000 --- a/Paramore.Brighter.Perf/Paramore.Brighter.Perf.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - Exe - netcoreapp2.2 - - - - - - - - - - - diff --git a/Paramore.Brighter.Perf/Program.cs b/Paramore.Brighter.Perf/Program.cs deleted file mode 100644 index add984491c..0000000000 --- a/Paramore.Brighter.Perf/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using BenchmarkDotNet.Running; - -namespace Paramore.Brighter.Perf -{ - class Program - { - static void Main(string[] args) - { - var summary = BenchmarkRunner.Run(); - Console.WriteLine(summary); - } - } - - - public class TestCommand : Command - { - public TestCommand() : base(Guid.NewGuid()) - { - } - - public string Message { get; set; } - public int Number { get; set; } - public DateTime DateNow { get; set; } - } -}