Skip to content

Commit e50ced4

Browse files
committed
fix(orm): diagnostics should return slow queries sorted by duration
1 parent f85711a commit e50ced4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/orm/src/client/client-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ export class ClientImpl {
443443
async $diagnostics(): Promise<Diagnostics> {
444444
return {
445445
zodCache: this.inputValidator.zodFactory.cacheStats,
446-
slowQueries: this.slowQueries.map((q) => ({ ...q })),
446+
slowQueries: this.slowQueries.map((q) => ({ ...q })).sort((a, b) => b.durationMs - a.durationMs),
447447
};
448448
}
449449

0 commit comments

Comments
 (0)