File tree Expand file tree Collapse file tree 4 files changed +28
-11
lines changed
benchmark/Razor.Template.Core.PerfBenchmark Expand file tree Collapse file tree 4 files changed +28
-11
lines changed Original file line number Diff line number Diff line change 11<Solution >
2+ <Folder Name =" /Benchmark/" >
3+ <Project Path =" benchmark/Razor.Template.Core.PerfBenchmark/Razor.Template.Core.PerfBenchmark.csproj" />
4+ </Folder >
25 <Folder Name =" /Core/" >
3- <Project Path =" src/Razor.Template.Core.PerfBenchmark/Razor.Template.Core.PerfBenchmark.csproj" />
46 <Project Path =" src/Razor.Templating.Core/Razor.Templating.Core.csproj" />
57 </Folder >
68 <Folder Name =" /Examples/" />
Original file line number Diff line number Diff line change 11using BenchmarkDotNet . Attributes ;
2+ using BenchmarkDotNet . Configs ;
3+ using BenchmarkDotNet . Diagnosers ;
4+ using BenchmarkDotNet . Exporters ;
25using BenchmarkDotNet . Running ;
36using ExampleRazorTemplatesLibrary . Models ;
47using Razor . Templating . Core ;
58
6- BenchmarkRunner . Run < RazorTemplateBenchMark > ( ) ;
9+ var config = ManualConfig . CreateMinimumViable ( )
10+ . AddExporter ( MarkdownExporter . GitHub )
11+ . WithArtifactsPath ( "." ) ;
12+
13+ BenchmarkRunner . Run < RazorTemplatingCoreBenchMark > ( config ) ;
714
815[ MemoryDiagnoser ]
9- public class RazorTemplateBenchMark
16+ [ MarkdownExporterAttribute . GitHub ]
17+ public class RazorTemplatingCoreBenchMark
1018{
11-
12- [ GlobalSetup ]
13- public void Setup ( )
14- {
15- }
16-
1719 [ Benchmark ]
1820 public async Task RenderViewWithModelAsync ( )
1921 {
Original file line number Diff line number Diff line change 88 </PropertyGroup >
99
1010 <ItemGroup >
11- <PackageReference Include =" BenchmarkDotNet" Version =" 0.14.0 " />
11+ <PackageReference Include =" BenchmarkDotNet" Version =" 0.15.1 " />
1212 </ItemGroup >
1313
1414 <ItemGroup >
1515 <ProjectReference Include =" ..\..\examples\Templates\ExampleAppRazorTemplates\ExampleRazorTemplatesLibrary.csproj" />
16- <ProjectReference Include =" ..\Razor.Templating.Core\Razor.Templating.Core.csproj" />
16+ <ProjectReference Include =" ..\..\src\ Razor.Templating.Core\Razor.Templating.Core.csproj" />
1717 </ItemGroup >
1818
1919</Project >
Original file line number Diff line number Diff line change 1+ ```
2+
3+ BenchmarkDotNet v0.15.1, Windows 11 (10.0.26100.4349/24H2/2024Update/HudsonValley)
4+ Unknown processor
5+ .NET SDK 9.0.301
6+ [Host] : .NET 8.0.16 (8.0.1625.21506), X64 RyuJIT AVX2
7+ DefaultJob : .NET 8.0.16 (8.0.1625.21506), X64 RyuJIT AVX2
8+
9+
10+ ```
11+ | Method | Mean | Error | StdDev | Median | Gen0 | Allocated |
12+ | ------------------------- | ---------:| ---------:| ---------:| ---------:| -------:| ----------:|
13+ | RenderViewWithModelAsync | 29.87 μs | 0.642 μs | 1.778 μs | 29.35 μs | 5.6152 | 23.16 KB |
You can’t perform that action at this time.
0 commit comments