-
Notifications
You must be signed in to change notification settings - Fork 1
添加benchmark #1
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
base: main
Are you sure you want to change the base?
添加benchmark #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,12 @@ | ||||||
| using BenchmarkDotNet.Running; | ||||||
|
|
||||||
| namespace SimpleBinarySerialization.Benchmakrs | ||||||
| { | ||||||
| internal class Program | ||||||
| { | ||||||
| static void Main(string[] args) | ||||||
| { | ||||||
| var _ = BenchmarkRunner.Run(typeof(Program).Assembly); | ||||||
|
||||||
| var _ = BenchmarkRunner.Run(typeof(Program).Assembly); | |
| BenchmarkRunner.Run(typeof(Program).Assembly); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,67 @@ | ||||||
| using BenchmarkDotNet.Attributes; | ||||||
| using MemoryPack; | ||||||
| using System.Text.Json.Serialization; | ||||||
|
|
||||||
| namespace SimpleBinarySerialization.Benchmakrs; | ||||||
|
||||||
| namespace SimpleBinarySerialization.Benchmakrs; | |
| namespace SimpleBinarySerialization.Benchmarks; |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name 'SerilizationBenchmark' is misspelled. It should be 'SerializationBenchmark'.
| public class SerilizationBenchmark | |
| public class SerializationBenchmark |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'Length' property is declared but never used in the benchmark class. Consider removing it if it's not needed.
| public int Length { get; set; } |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Field 'serializer' can be 'readonly'.
| private SimpleBinarySerializer serializer = new(); | |
| private readonly SimpleBinarySerializer serializer = new(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <OutputType>Exe</OutputType> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="BenchmarkDotNet" Version="0.15.2" /> | ||
| <PackageReference Include="MemoryPack" Version="1.21.4" /> | ||
| <PackageReference Include="Newtonsoft.Json" Version="13.0.4" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\SimpleBinarySerialization\SimpleBinarySerialization.csproj" /> | ||
| </ItemGroup> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,10 +1,12 @@ | ||||||
| | ||||||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||||||
| # Visual Studio Version 17 | ||||||
| VisualStudioVersion = 17.13.35825.156 d17.13 | ||||||
| # Visual Studio Version 18 | ||||||
| VisualStudioVersion = 18.0.11123.170 | ||||||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||||||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBinarySerialization", "SimpleBinarySerialization\SimpleBinarySerialization.csproj", "{ECAA2430-866C-467B-8B77-D9DAA629D8CC}" | ||||||
| EndProject | ||||||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBinarySerialization.Benchmakrs", "SimpleBinarySerialization.Benchmakrs\SimpleBinarySerialization.Benchmakrs.csproj", "{E127D779-53D4-44F7-AB74-B2BF10CB3DEF}" | ||||||
|
||||||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBinarySerialization.Benchmakrs", "SimpleBinarySerialization.Benchmakrs\SimpleBinarySerialization.Benchmakrs.csproj", "{E127D779-53D4-44F7-AB74-B2BF10CB3DEF}" | |
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleBinarySerialization.Benchmarks", "SimpleBinarySerialization.Benchmarks\SimpleBinarySerialization.Benchmarks.csproj", "{E127D779-53D4-44F7-AB74-B2BF10CB3DEF}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namespace 'Benchmakrs' is misspelled. It should be 'Benchmarks'.