-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4400c4
commit 9ca3e09
Showing
101 changed files
with
2,217 additions
and
3,417 deletions.
There are no files selected for viewing
Binary file not shown.
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,86 @@ | ||
using BenchmarkDotNet.Attributes; | ||
using BenchmarkDotNet.Configs; | ||
|
||
namespace Fluid.Benchmarks | ||
{ | ||
[MemoryDiagnoser, GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory), ShortRunJob] | ||
public class ComparisonBenchmarks | ||
{ | ||
private FluidBenchmarks _fluidBenchmarks = new FluidBenchmarks(); | ||
private DotLiquidBenchmarks _dotLiquidBenchmarks = new DotLiquidBenchmarks(); | ||
private LiquidNetBenchmarks _liquidNetBenchmarks = new LiquidNetBenchmarks(); | ||
private ScribanBenchmarks _scribanBenchmarks = new ScribanBenchmarks(); | ||
|
||
[Benchmark(Baseline = true), BenchmarkCategory("Parse")] | ||
public object Fluid_Parse() | ||
{ | ||
return _fluidBenchmarks.Parse(); | ||
} | ||
|
||
[Benchmark(Baseline = true), BenchmarkCategory("ParseBig")] | ||
public object Fluid_ParseBig() | ||
{ | ||
return _fluidBenchmarks.ParseBig(); | ||
} | ||
|
||
[Benchmark(Baseline = true), BenchmarkCategory("Render")] | ||
public string Fluid_Render() | ||
{ | ||
return _fluidBenchmarks.Render(); | ||
} | ||
|
||
[Benchmark, BenchmarkCategory("Parse")] | ||
public object Scriban_Parse() | ||
{ | ||
return _scribanBenchmarks.Parse(); | ||
} | ||
|
||
[Benchmark, BenchmarkCategory("ParseBig")] | ||
public object Scriban_ParseBig() | ||
{ | ||
return _scribanBenchmarks.ParseBig(); | ||
} | ||
|
||
[Benchmark, BenchmarkCategory("Render")] | ||
public string Scriban_Render() | ||
{ | ||
return _scribanBenchmarks.Render(); | ||
} | ||
|
||
[Benchmark, BenchmarkCategory("Parse")] | ||
public object DotLiquid_Parse() | ||
{ | ||
return _dotLiquidBenchmarks.Parse(); | ||
} | ||
|
||
[Benchmark, BenchmarkCategory("ParseBig")] | ||
public object DotLiquid_ParseBig() | ||
{ | ||
return _dotLiquidBenchmarks.ParseBig(); | ||
} | ||
|
||
[Benchmark, BenchmarkCategory("Render")] | ||
public string DotLiquid_Render() | ||
{ | ||
return _dotLiquidBenchmarks.Render(); | ||
} | ||
|
||
[Benchmark, BenchmarkCategory("Parse")] | ||
public object LiquidNet_Parse() | ||
{ | ||
return _liquidNetBenchmarks.Parse(); | ||
} | ||
|
||
[Benchmark, BenchmarkCategory("ParseBig")] | ||
public object LiquidNet_ParseBig() | ||
{ | ||
return _liquidNetBenchmarks.ParseBig(); | ||
} | ||
|
||
[Benchmark, BenchmarkCategory("Render")] | ||
public string LiquidNet_Render() | ||
{ | ||
return _liquidNetBenchmarks.Render(); | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.