File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed
Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -400,3 +400,4 @@ FodyWeavers.xsd
400400
401401# Generated files
402402/Dolly /Generated /*
403+ /.idea
Original file line number Diff line number Diff line change 66namespace Dolly . Benchmarks ;
77
88[ MemoryDiagnoser ]
9+ [ Orderer ( BenchmarkDotNet . Order . SummaryOrderPolicy . FastestToSlowest ) ]
910public class CloneBenchmarks
1011{
1112 private readonly ComplexClass _complexClass ;
@@ -89,8 +90,8 @@ public void TestDeepCloner()
8990 DeepClonerExtensions . DeepClone ( _complexClass ) ;
9091 }
9192
92- [ Benchmark ( Description = "FastCloner " ) ]
93- public void TestFastCloner ( )
93+ [ Benchmark ( Description = "FastDeepCloner " ) ]
94+ public void TestFastDeepCloner ( )
9495 {
9596 var clone = FastDeepCloner . DeepCloner . Clone ( _complexClass ) ;
9697 }
@@ -106,4 +107,10 @@ public void TestAnyClone()
106107 {
107108 var clone = AnyClone . CloneExtensions . Clone ( _complexClass ) ;
108109 }
110+
111+ [ Benchmark ( Description = "FastCloner" ) ]
112+ public void TestFastCloner ( )
113+ {
114+ var clone = _complexClass . FastDeepClone ( ) ;
115+ }
109116}
Original file line number Diff line number Diff line change 1212 <PackageReference Include =" BenchmarkDotNet" Version =" 0.14.0" />
1313 <PackageReference Include =" CloneExtensions" Version =" 1.4.2" />
1414 <PackageReference Include =" DeepCloner" Version =" 0.10.4" />
15+ <PackageReference Include =" FastCloner.SourceGenerator" Version =" 1.0.1" >
16+ <PrivateAssets >all</PrivateAssets >
17+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
18+ </PackageReference >
19+ <PackageReference Include =" FastCloner.SourceGenerator.Shared" Version =" 1.0.0" />
1520 <PackageReference Include =" FastDeepCloner" Version =" 1.3.6" />
1621 <PackageReference Include =" NClone" Version =" 1.2.0" />
1722 </ItemGroup >
Original file line number Diff line number Diff line change 1+ using FastCloner . SourceGenerator . Shared ;
2+
13namespace Dolly . Benchmarks ;
24
35public class SimpleClassBase
@@ -6,6 +8,7 @@ public class SimpleClassBase
68}
79
810[ Clonable ]
11+ [ FastClonerClonable ]
912public partial class SimpleClass : SimpleClassBase
1013{
1114 public int Int { get ; set ; }
@@ -18,6 +21,7 @@ public partial class SimpleClass : SimpleClassBase
1821}
1922
2023[ Clonable ]
24+ [ FastClonerClonable ]
2125public partial class ComplexClass
2226{
2327 public SimpleClass SimpleClass { get ; set ; }
You can’t perform that action at this time.
0 commit comments