File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
dashboard-fe/src/database/drivers Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -216,11 +216,17 @@ export default class DriverMongoDB implements Driver {
216
216
environment : string ,
217
217
version : string
218
218
) : Promise < ApplicationVersion | null > {
219
+ const ts = Math . random ( ) ;
220
+ console . time ( "applicationVersion_find-" + ts ) ;
221
+
219
222
let versions = await this . applicationVersionsTable . search ( {
220
223
applicationId,
221
224
environment,
222
225
version,
223
226
} ) ;
227
+
228
+ console . timeEnd ( "applicationVersion_find-" + ts ) ;
229
+
224
230
return versions . length > 0 ? versions [ 0 ] : null ;
225
231
}
226
232
@@ -229,6 +235,8 @@ export default class DriverMongoDB implements Driver {
229
235
environment : string ,
230
236
version ?: string
231
237
) : Promise < Array < ApplicationVersion > > {
238
+ const ts = Math . random ( ) ;
239
+ console . time ( "applicationVersion_findAll-" + ts ) ;
232
240
const q : any = {
233
241
applicationId,
234
242
} ;
@@ -240,6 +248,8 @@ export default class DriverMongoDB implements Driver {
240
248
}
241
249
const versions = await this . applicationVersionsTable . search ( q ) ;
242
250
251
+ console . timeEnd ( "applicationVersion_findAll-" + ts ) ;
252
+
243
253
return versions . length > 0 ? versions : [ ] ;
244
254
}
245
255
You can’t perform that action at this time.
0 commit comments