From 110eeb89f1a581980e04ab84e8a18eaf9b96c550 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Feb 2019 04:18:09 +0900 Subject: [PATCH] Clean up --- src/server/api/call.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/server/api/call.ts b/src/server/api/call.ts index f2fd3b754..8efc67960 100644 --- a/src/server/api/call.ts +++ b/src/server/api/call.ts @@ -1,4 +1,3 @@ -import { performance } from 'perf_hooks'; import limiter from './limiter'; import { IUser } from '../../models/user'; import { IApp } from '../../models/app'; @@ -50,15 +49,7 @@ export default async (endpoint: string, user: IUser, app: IApp, data: any, file? // API invoking try { - const before = performance.now(); res = await ep.exec(data, user, app, file); - const after = performance.now(); - - const time = after - before; - - if (time > 1000) { - console.warn(`SLOW API CALL DETECTED: ${ep.name} (${time}ms)`); - } } catch (e) { if (e && e.name == 'INVALID_PARAM') { throw {