-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/5.0.0' into main
- Loading branch information
Showing
32 changed files
with
818 additions
and
745 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\DcsBiosCommunicator\DcsBiosCommunicator.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using BenchmarkDotNet.Attributes; | ||
using BenchmarkDotNet.Jobs; | ||
using DcsBios.Communicator.DataParsers; | ||
|
||
namespace Benchmark; | ||
|
||
[SimpleJob(RuntimeMoniker.Net80, baseline: true)] | ||
public class DataParserBenchmarkTests | ||
{ | ||
private readonly StringParser _stringParser = new(0, 2, "ID"); | ||
private readonly IntegerParser _intParser = new(8, 3, "ID"); | ||
|
||
private const int TestStringData = 'a' | ('b' << 8); | ||
private const int ClearStringData = ' ' | (' ' << 8); | ||
|
||
[Benchmark] | ||
public void TestString() | ||
{ | ||
_stringParser.AddData(0, TestStringData); | ||
_stringParser.AddData(0, ClearStringData); | ||
} | ||
|
||
private const int TestIntData = 16; | ||
private const int ClearIntData = 0; | ||
|
||
[Benchmark] | ||
public void TestInt() | ||
{ | ||
_intParser.AddData(0, TestIntData); | ||
_intParser.AddData(0, ClearIntData); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
using Benchmark; | ||
using BenchmarkDotNet.Running; | ||
|
||
BenchmarkRunner.Run<DataParserBenchmarkTests>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.