This commit is contained in:
syuilo 2023-01-01 17:38:02 +09:00
parent c3a36698e5
commit 4c4af2ae84
1 changed files with 0 additions and 7 deletions

View File

@ -290,7 +290,6 @@ export class ApiCallService implements OnApplicationShutdown {
}
// API invoking
const before = performance.now();
return await ep.exec(data, user, token, file, request.ip, request.headers).catch((err: Error) => {
if (err instanceof ApiError) {
throw err;
@ -313,12 +312,6 @@ export class ApiCallService implements OnApplicationShutdown {
},
});
}
}).finally(() => {
const after = performance.now();
const time = after - before;
if (time > 1000) {
this.logger.warn(`SLOW API CALL DETECTED: ${ep.name} (${time}ms)`);
}
});
}