Skip to content

Commit bb41201

Browse files
adding more timers
1 parent 8c8d3ee commit bb41201

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dashboard-fe/src/database/drivers/driver-mongodb.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,17 @@ export default class DriverMongoDB implements Driver {
216216
environment: string,
217217
version: string
218218
): Promise<ApplicationVersion | null> {
219+
const ts = Math.random();
220+
console.time("applicationVersion_find-" + ts);
221+
219222
let versions = await this.applicationVersionsTable.search({
220223
applicationId,
221224
environment,
222225
version,
223226
});
227+
228+
console.timeEnd("applicationVersion_find-" + ts);
229+
224230
return versions.length > 0 ? versions[0] : null;
225231
}
226232

@@ -229,6 +235,8 @@ export default class DriverMongoDB implements Driver {
229235
environment: string,
230236
version?: string
231237
): Promise<Array<ApplicationVersion>> {
238+
const ts = Math.random();
239+
console.time("applicationVersion_findAll-" + ts);
232240
const q: any = {
233241
applicationId,
234242
};
@@ -240,6 +248,8 @@ export default class DriverMongoDB implements Driver {
240248
}
241249
const versions = await this.applicationVersionsTable.search(q);
242250

251+
console.timeEnd("applicationVersion_findAll-" + ts);
252+
243253
return versions.length > 0 ? versions : [];
244254
}
245255

0 commit comments

Comments
 (0)