forked from MoonStorm/FastCrud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBenchmarks.feature
119 lines (113 loc) · 6.19 KB
/
Benchmarks.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Feature: Queries
@InMemoryBenchmark
Scenario Outline: Insert Benchmark
Given I have initialized a <database type> database
When I start the stopwatch
And I insert <entity count> <entity type> using <orm>
And I stop the stopwatch
And I report the stopwatch value for <orm> finished processing <entity count> operations of type insert
Then I should have <entity count> <entity type> in the database
And I cleanup the <database type> database
Examples:
| database type | entity type | entity count | orm |
| Benchmark LocalDb | benchmark entities | 30000 | Simple Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper Extensions |
| Benchmark LocalDb | benchmark entities | 30000 | Fast Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper |
| Benchmark LocalDb | benchmark entities | 30000 | Entity Framework |
#Scenario Outline: Batch Select No Filter No Warmup Benchmark
# Given I have initialized a <database type> database
# When I insert <entity count> <entity type> using ADO .NET
# And I refresh the database connection
# And I start the stopwatch
# And I select all the <entity type> using <orm>
# And I stop the stopwatch
# And I report the stopwatch value for <orm> finished processing 1 operations of type select all - no warmup
# Then I should have queried <entity count> entities
# And the queried entities should be the same as the ones I inserted
# And I cleanup the <database type> database
# Examples:
# | database type | entity type | entity count | orm |
# | LocalDb | benchmark entities | 20000 | Simple Crud |
# | LocalDb | benchmark entities | 20000 | Dapper Extensions |
# | LocalDb | benchmark entities | 20000 | Fast Crud |
# | LocalDb | benchmark entities | 20000 | Dapper |
@InMemoryBenchmark
Scenario Outline: Batch Select No Filter
Given I have initialized a <database type> database
When I insert <entity count> <entity type> using ADO .NET
And I refresh the database connection
And I start the stopwatch
And I select all the <entity type> using <orm>
And I clear all the queried entities
And I select all the <entity type> using <orm>
And I clear all the queried entities
And I select all the <entity type> using <orm>
And I stop the stopwatch
And I report the stopwatch value for <orm> finished processing 3 operations of type select all
Then I should have queried <entity count> entities
Then the queried entities should be the same as the local ones
And I cleanup the <database type> database
Examples:
| database type | entity type | entity count | orm |
| Benchmark LocalDb | benchmark entities | 30000 | Simple Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper Extensions |
| Benchmark LocalDb | benchmark entities | 30000 | Fast Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper |
| Benchmark LocalDb | benchmark entities | 30000 | Entity Framework |
@InMemoryBenchmark
Scenario Outline: Single Delete Benchmark
Given I have initialized a <database type> database
When I insert <entity count> <entity type> using ADO .NET
And I refresh the database connection
And I start the stopwatch
And I delete all the inserted <entity type> using <orm>
And I stop the stopwatch
And I report the stopwatch value for <orm> finished processing <entity count> operations of type delete
Then I should have 0 <entity type> in the database
And I cleanup the <database type> database
Examples:
| database type | entity type | entity count | orm |
| Benchmark LocalDb | benchmark entities | 30000 | Simple Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper Extensions |
| Benchmark LocalDb | benchmark entities | 30000 | Fast Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper |
| Benchmark LocalDb | benchmark entities | 30000 | Entity Framework |
@InMemoryBenchmark
Scenario Outline: Single Select Id Filter Benchmark
Given I have initialized a <database type> database
When I insert <entity count> <entity type> using ADO .NET
And I refresh the database connection
And I start the stopwatch
And I select all the <entity type> that I previously inserted using <orm>
And I stop the stopwatch
And I report the stopwatch value for <orm> finished processing <entity count> operations of type select by id
Then I should have queried <entity count> entities
Then the queried entities should be the same as the local ones
And I cleanup the <database type> database
Examples:
| database type | entity type | entity count | orm |
| Benchmark LocalDb | benchmark entities | 30000 | Simple Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper Extensions |
| Benchmark LocalDb | benchmark entities | 30000 | Fast Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper |
| Benchmark LocalDb | benchmark entities | 30000 | Entity Framework |
@InMemoryBenchmark
Scenario Outline: Single Update Benchmark
Given I have initialized a <database type> database
When I insert <entity count> <entity type> using ADO .NET
And I refresh the database connection
And I start the stopwatch
And I update all the <entity type> that I previously inserted using <orm>
And I stop the stopwatch
And I report the stopwatch value for <orm> finished processing <entity count> operations of type update
And I select all the <entity type> using Dapper
Then the queried entities should be the same as the local ones
Then I cleanup the <database type> database
Examples:
| database type | entity type | entity count | orm |
| Benchmark LocalDb | benchmark entities | 30000 | Simple Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper Extensions |
| Benchmark LocalDb | benchmark entities | 30000 | Fast Crud |
| Benchmark LocalDb | benchmark entities | 30000 | Dapper |
| Benchmark LocalDb | benchmark entities | 30000 | Entity Framework |