Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark using dotnet 8 #101

Merged
merged 1 commit into from
Dec 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading