@@ -11,48 +11,13 @@ public class TestAll
1111 [ Params ( 100_000 ) ] //, 1_000_000)]
1212 public int Iterations { get ; set ; }
1313
14- [ Benchmark ( Description = "Mapster 7.2.0" ) ]
14+ [ Benchmark ]
1515 public void MapsterTest ( )
1616 {
1717 TestAdaptHelper . TestMapsterAdapter < Foo , Foo > ( _fooInstance , Iterations ) ;
1818 TestAdaptHelper . TestMapsterAdapter < Customer , CustomerDTO > ( _customerInstance , Iterations ) ;
1919 }
2020
21- //[Benchmark(Description = "Mapster 7.2.0 (Roslyn)")]
22- //public void RoslynTest()
23- //{
24- // TestAdaptHelper.TestMapsterAdapter<Foo, Foo>(_fooInstance, Iterations);
25- // TestAdaptHelper.TestMapsterAdapter<Customer, CustomerDTO>(_customerInstance, Iterations);
26- //}
27-
28- //[Benchmark(Description = "Mapster 7.2.0 (FEC)")]
29- //public void FecTest()
30- //{
31- // TestAdaptHelper.TestMapsterAdapter<Foo, Foo>(_fooInstance, Iterations);
32- // TestAdaptHelper.TestMapsterAdapter<Customer, CustomerDTO>(_customerInstance, Iterations);
33- //}
34-
35- //[Benchmark(Description = "Mapster 7.2.0 (Codegen)")]
36- //public void CodegenTest()
37- //{
38- // TestAdaptHelper.TestCodeGen(_fooInstance, Iterations);
39- // TestAdaptHelper.TestCodeGen(_customerInstance, Iterations);
40- //}
41-
42- //[Benchmark(Description = "ExpressMapper 1.9.1")]
43- //public void ExpressMapperTest()
44- //{
45- // TestAdaptHelper.TestExpressMapper<Foo, Foo>(_fooInstance, Iterations);
46- // TestAdaptHelper.TestExpressMapper<Customer, CustomerDTO>(_customerInstance, Iterations);
47- //}
48-
49- //[Benchmark(Description = "AutoMapper 10.1.1")]
50- //public void AutoMapperTest()
51- //{
52- // TestAdaptHelper.TestAutoMapper<Foo, Foo>(_fooInstance, Iterations);
53- // TestAdaptHelper.TestAutoMapper<Customer, CustomerDTO>(_customerInstance, Iterations);
54- //}
55-
5621 [ GlobalSetup ( Target = nameof ( MapsterTest ) ) ]
5722 public void SetupMapster ( )
5823 {
@@ -61,51 +26,5 @@ public void SetupMapster()
6126 TestAdaptHelper . ConfigureMapster ( _fooInstance , MapsterCompilerType . Default ) ;
6227 TestAdaptHelper . ConfigureMapster ( _customerInstance , MapsterCompilerType . Default ) ;
6328 }
64-
65- //[GlobalSetup(Target = nameof(RoslynTest))]
66- //public void SetupRoslyn()
67- //{
68- // _fooInstance = TestAdaptHelper.SetupFooInstance();
69- // _customerInstance = TestAdaptHelper.SetupCustomerInstance();
70- // TestAdaptHelper.ConfigureMapster(_fooInstance, MapsterCompilerType.Roslyn);
71- // TestAdaptHelper.ConfigureMapster(_customerInstance, MapsterCompilerType.Roslyn);
72- //}
73-
74- //[GlobalSetup(Target = nameof(FecTest))]
75- //public void SetupFec()
76- //{
77- // _fooInstance = TestAdaptHelper.SetupFooInstance();
78- // _customerInstance = TestAdaptHelper.SetupCustomerInstance();
79- // TestAdaptHelper.ConfigureMapster(_fooInstance, MapsterCompilerType.FEC);
80- // TestAdaptHelper.ConfigureMapster(_customerInstance, MapsterCompilerType.FEC);
81- //}
82-
83- //[GlobalSetup(Target = nameof(CodegenTest))]
84- //public void SetupCodegen()
85- //{
86- // //_fooInstance = TestAdaptHelper.SetupFooInstance();
87- // //_customerInstance = TestAdaptHelper.SetupCustomerInstance();
88- // //FooMapper.Map(_fooInstance);
89- // //CustomerMapper.Map(_customerInstance);
90- //}
91-
92- //[GlobalSetup(Target = nameof(ExpressMapperTest))]
93- //public void SetupExpressMapper()
94- //{
95- // _fooInstance = TestAdaptHelper.SetupFooInstance();
96- // _customerInstance = TestAdaptHelper.SetupCustomerInstance();
97- // TestAdaptHelper.ConfigureExpressMapper(_fooInstance);
98- // TestAdaptHelper.ConfigureExpressMapper(_customerInstance);
99- //}
100-
101- //[GlobalSetup(Target = nameof(AutoMapperTest))]
102- //public void SetupAutoMapper()
103- //{
104- // _fooInstance = TestAdaptHelper.SetupFooInstance();
105- // _customerInstance = TestAdaptHelper.SetupCustomerInstance();
106- // TestAdaptHelper.ConfigureAutoMapper(_fooInstance);
107- // TestAdaptHelper.ConfigureAutoMapper(_customerInstance);
108- //}
109-
11029 }
11130}
0 commit comments