@@ -78,10 +78,10 @@ public async Task PerformanceAnalysis_SELECT_Test()
78
78
var fbCommand = new FbCommand ( "SELECT MAX(INT_FIELD) FROM TEST" , Connection ) ;
79
79
var maxIntField = await fbCommand . ExecuteScalarAsync ( ) as int ? ;
80
80
81
- insertCount = GetAffectedTables ( insertCount , await dbInfo . GetInsertCountAsync ( ) ) ;
82
- updateCount = GetAffectedTables ( updateCount , await dbInfo . GetUpdateCountAsync ( ) ) ;
83
- readSeqCount = GetAffectedTables ( readSeqCount , await dbInfo . GetReadSeqCountAsync ( ) ) ;
84
- readIdxCount = GetAffectedTables ( readIdxCount , await dbInfo . GetReadIdxCountAsync ( ) ) ;
81
+ insertCount = await GetAffectedTables ( insertCount , await dbInfo . GetInsertCountAsync ( ) ) ;
82
+ updateCount = await GetAffectedTables ( updateCount , await dbInfo . GetUpdateCountAsync ( ) ) ;
83
+ readSeqCount = await GetAffectedTables ( readSeqCount , await dbInfo . GetReadSeqCountAsync ( ) ) ;
84
+ readIdxCount = await GetAffectedTables ( readIdxCount , await dbInfo . GetReadIdxCountAsync ( ) ) ;
85
85
86
86
Assert . That ( insertCount . ContainsKey ( tableIdTest ) , Is . False ) ;
87
87
Assert . That ( updateCount . ContainsKey ( tableIdTest ) , Is . False ) ;
@@ -105,10 +105,10 @@ public async Task PerformanceAnalysis_INSERT_Test()
105
105
var fbCommand = new FbCommand ( "INSERT INTO TEST (INT_FIELD) VALUES (900)" , Connection ) ;
106
106
await fbCommand . ExecuteNonQueryAsync ( ) ;
107
107
108
- insertCount = GetAffectedTables ( insertCount , await dbInfo . GetInsertCountAsync ( ) ) ;
109
- updateCount = GetAffectedTables ( updateCount , await dbInfo . GetUpdateCountAsync ( ) ) ;
110
- readSeqCount = GetAffectedTables ( readSeqCount , await dbInfo . GetReadSeqCountAsync ( ) ) ;
111
- readIdxCount = GetAffectedTables ( readIdxCount , await dbInfo . GetReadIdxCountAsync ( ) ) ;
108
+ insertCount = await GetAffectedTables ( insertCount , await dbInfo . GetInsertCountAsync ( ) ) ;
109
+ updateCount = await GetAffectedTables ( updateCount , await dbInfo . GetUpdateCountAsync ( ) ) ;
110
+ readSeqCount = await GetAffectedTables ( readSeqCount , await dbInfo . GetReadSeqCountAsync ( ) ) ;
111
+ readIdxCount = await GetAffectedTables ( readIdxCount , await dbInfo . GetReadIdxCountAsync ( ) ) ;
112
112
113
113
Assert . That ( insertCount . ContainsKey ( tableIdTest ) , Is . True ) ;
114
114
Assert . That ( insertCount [ tableIdTest ] , Is . EqualTo ( 1 ) ) ;
@@ -124,7 +124,7 @@ public async Task PerformanceAnalysis_UPDATE_Test()
124
124
var tableIdTest = tableNameList [ "TEST" ] ;
125
125
126
126
var fbCommand = new FbCommand ( "INSERT INTO TEST (INT_FIELD) VALUES (900)" , Connection ) ;
127
- fbCommand . ExecuteNonQuery ( ) ;
127
+ await fbCommand . ExecuteNonQueryAsync ( ) ;
128
128
129
129
var dbInfo = new FbDatabaseInfo ( Connection ) ;
130
130
var insertCount = await dbInfo . GetInsertCountAsync ( ) ;
@@ -135,10 +135,10 @@ public async Task PerformanceAnalysis_UPDATE_Test()
135
135
fbCommand . CommandText = "UPDATE TEST SET SMALLINT_FIELD = 900 WHERE (INT_FIELD = 900)" ;
136
136
await fbCommand . ExecuteNonQueryAsync ( ) ;
137
137
138
- insertCount = GetAffectedTables ( insertCount , await dbInfo . GetInsertCountAsync ( ) ) ;
139
- updateCount = GetAffectedTables ( updateCount , await dbInfo . GetUpdateCountAsync ( ) ) ;
140
- readSeqCount = GetAffectedTables ( readSeqCount , await dbInfo . GetReadSeqCountAsync ( ) ) ;
141
- readIdxCount = GetAffectedTables ( readIdxCount , await dbInfo . GetReadIdxCountAsync ( ) ) ;
138
+ insertCount = await GetAffectedTables ( insertCount , await dbInfo . GetInsertCountAsync ( ) ) ;
139
+ updateCount = await GetAffectedTables ( updateCount , await dbInfo . GetUpdateCountAsync ( ) ) ;
140
+ readSeqCount = await GetAffectedTables ( readSeqCount , await dbInfo . GetReadSeqCountAsync ( ) ) ;
141
+ readIdxCount = await GetAffectedTables ( readIdxCount , await dbInfo . GetReadIdxCountAsync ( ) ) ;
142
142
143
143
Assert . That ( insertCount . ContainsKey ( tableIdTest ) , Is . False ) ;
144
144
Assert . That ( updateCount . ContainsKey ( tableIdTest ) , Is . True ) ;
@@ -148,7 +148,7 @@ public async Task PerformanceAnalysis_UPDATE_Test()
148
148
Assert . That ( readIdxCount [ tableIdTest ] , Is . EqualTo ( 1 ) ) ;
149
149
}
150
150
151
- IDictionary < short , ulong > GetAffectedTables ( IDictionary < short , ulong > statisticInfoBefore , IDictionary < short , ulong > statisticInfoAfter )
151
+ async Task < IDictionary < short , ulong > > GetAffectedTables ( IDictionary < short , ulong > statisticInfoBefore , IDictionary < short , ulong > statisticInfoAfter )
152
152
{
153
153
var result = new Dictionary < short , ulong > ( ) ;
154
154
foreach ( var keyValuePair in statisticInfoAfter )
@@ -164,7 +164,7 @@ IDictionary<short, ulong> GetAffectedTables(IDictionary<short, ulong> statisticI
164
164
else
165
165
result . Add ( keyValuePair . Key , keyValuePair . Value ) ;
166
166
}
167
- return result ;
167
+ return await Task . FromResult ( result ) ;
168
168
}
169
169
170
170
async Task < IDictionary < string , short > > GetTableNameList ( )
0 commit comments