Skip to content

Commit

Permalink
benchmark using dotnet 8 (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
leandromoh authored Dec 24, 2023
1 parent 8213cc2 commit 7423944
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
2 changes: 1 addition & 1 deletion RecordParser.Benchmark/FixedLengthReaderBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace RecordParser.Benchmark
{
[MemoryDiagnoser]
[SimpleJob(RuntimeMoniker.Net70)]
[SimpleJob(RuntimeMoniker.Net80)]
public class FixedLengthReaderBenchmark
{
[Params(400_000)]
Expand Down
32 changes: 1 addition & 31 deletions RecordParser.Benchmark/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,7 @@ static async Task Main(string[] args)
#if DEBUG
new VariableLengthReaderBenchmark() { LimitRecord = 500_000 }.Read_VariableLength_FullQuoted_RecordParser_Parallel(false, true);
#else
Console.WriteLine("Benchmark options:");
Console.WriteLine("0 - all");
Console.WriteLine("1 - variable length writer");
Console.WriteLine("2 - variable length reader");
Console.WriteLine("3 - fixed length reader");
Console.WriteLine("Digit the number of desired benchmark: ");
var option = int.Parse(Console.ReadLine());

switch (option)
{
case 0:
BenchmarkRunner.Run<VariableLengthWriterBenchmark>();
BenchmarkRunner.Run<VariableLengthReaderBenchmark>();
BenchmarkRunner.Run<FixedLengthReaderBenchmark>();
break;

case 1:
BenchmarkRunner.Run<VariableLengthWriterBenchmark>();
break;

case 2:
BenchmarkRunner.Run<VariableLengthReaderBenchmark>();
break;

case 3:
BenchmarkRunner.Run<FixedLengthReaderBenchmark>();
break;

default:
throw new NotSupportedException("invalid option");
}
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run();
#endif
Console.Out.Write("Hit <enter> to exit...");
Console.In.ReadLine();
Expand Down
2 changes: 1 addition & 1 deletion RecordParser.Benchmark/RecordParser.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="Ben.StringIntern" Version="0.1.8" />
<PackageReference Include="Cursively" Version="1.2.0" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.2" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.11" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="FlatFiles" Version="5.0.4" />
<PackageReference Include="SoftCircuits.CsvParser" Version="3.5.1" />
Expand Down
2 changes: 1 addition & 1 deletion RecordParser.Benchmark/VariableLengthReaderBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace RecordParser.Benchmark
{
[MemoryDiagnoser]
[SimpleJob(RuntimeMoniker.Net70)]
[SimpleJob(RuntimeMoniker.Net80)]
public class VariableLengthReaderBenchmark
{
[Params(500_000)]
Expand Down
2 changes: 1 addition & 1 deletion RecordParser.Benchmark/VariableLengthWriterBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace RecordParser.Benchmark
{
[MemoryDiagnoser]
[SimpleJob(RuntimeMoniker.Net70)]
[SimpleJob(RuntimeMoniker.Net80)]
public class VariableLengthWriterBenchmark
{
[Params(500_000)]
Expand Down

0 comments on commit 7423944

Please sign in to comment.