File tree Expand file tree Collapse file tree 3 files changed +35
-35
lines changed
benchmark/BenchmarkRunner Expand file tree Collapse file tree 3 files changed +35
-35
lines changed Original file line number Diff line number Diff line change 1- using BenchmarkDotNet . Attributes ;
2-
3- public abstract class ReadBenchmark
4- {
5- protected bool _isInitialized = false ;
6- protected SemaphoreSlim _initLock = new ( 1 , 1 ) ;
7-
8- [ Params ( 1000 ) ]
9- protected int QueriesToRun { get ; set ; }
10-
11- [ Params ( 500 ) ]
12- protected int CustomerCount { get ; set ; }
13-
14- [ Params ( 100 , 500 ) ]
15- public int Limit { get ; set ; }
16-
17- public abstract Task Sqlc_GetCustomerOrders ( ) ;
18- public abstract Task EFCore_NoTracking_GetCustomerOrders ( ) ;
19- public abstract Task EFCore_WithTracking_GetCustomerOrders ( ) ;
1+ using BenchmarkDotNet . Attributes ;
2+
3+ public abstract class ReadBenchmark
4+ {
5+ protected bool _isInitialized = false ;
6+ protected SemaphoreSlim _initLock = new ( 1 , 1 ) ;
7+
8+ [ Params ( 1000 ) ]
9+ protected int QueriesToRun { get ; set ; }
10+
11+ [ Params ( 500 ) ]
12+ protected int CustomerCount { get ; set ; }
13+
14+ [ Params ( 100 , 500 ) ]
15+ public int Limit { get ; set ; }
16+
17+ public abstract Task Sqlc_GetCustomerOrders ( ) ;
18+ public abstract Task EFCore_NoTracking_GetCustomerOrders ( ) ;
19+ public abstract Task EFCore_WithTracking_GetCustomerOrders ( ) ;
2020}
Original file line number Diff line number Diff line change 1- using BenchmarkDotNet . Attributes ;
2-
3- public abstract class WriteBenchmark
4- {
5- protected bool _isInitialized = false ;
6- protected SemaphoreSlim _initLock = new ( 1 , 1 ) ;
7-
8- [ Params ( 2000000 ) ]
9- protected int TotalRecords { get ; set ; }
10-
11- public abstract Task Sqlc_AddOrderItems ( ) ;
12- public abstract Task EFCore_AddOrderItems ( ) ;
1+ using BenchmarkDotNet . Attributes ;
2+
3+ public abstract class WriteBenchmark
4+ {
5+ protected bool _isInitialized = false ;
6+ protected SemaphoreSlim _initLock = new ( 1 , 1 ) ;
7+
8+ [ Params ( 2000000 ) ]
9+ protected int TotalRecords { get ; set ; }
10+
11+ public abstract Task Sqlc_AddOrderItems ( ) ;
12+ public abstract Task EFCore_AddOrderItems ( ) ;
1313}
Original file line number Diff line number Diff line change 1- public interface IBenchmarkRunner
2- {
3- Task RunReadsAsync ( ) ;
4- Task RunWritesAsync ( ) ;
1+ public interface IBenchmarkRunner
2+ {
3+ Task RunReadsAsync ( ) ;
4+ Task RunWritesAsync ( ) ;
55}
You can’t perform that action at this time.
0 commit comments