From 57927d5988c119270940189bbbb09915d12f9946 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 8 Oct 2018 01:12:11 +0800 Subject: [PATCH] app: print 50 routes and ips in debug --- router.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/router.js b/router.js index 5715d67b85..ddd539e5d4 100644 --- a/router.js +++ b/router.js @@ -18,14 +18,14 @@ router.get('/', async (ctx) => { }); const routes = Object.keys(ctx.debug.routes).sort((a, b) => ctx.debug.routes[b] - ctx.debug.routes[a]); - const hotRoutes = routes.slice(0, 10); + const hotRoutes = routes.slice(0, 50); let hotRoutesValue = ''; hotRoutes.forEach((item) => { hotRoutesValue += `${ctx.debug.routes[item]}  ${item}
`; }); const ips = Object.keys(ctx.debug.ips).sort((a, b) => ctx.debug.ips[b] - ctx.debug.ips[a]); - const hotIPs = ips.slice(0, 10); + const hotIPs = ips.slice(0, 50); let hotIPsValue = ''; hotIPs.forEach((item) => { hotIPsValue += `${ctx.debug.ips[item]}  ${item}
`;