This commit is contained in:
Dragory 2021-09-11 21:48:12 +03:00
parent de540a2a8a
commit 0a00be7a72
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -17,7 +17,7 @@ export const RestPerformanceCmd = botControlCmd({
async run({ pluginData, message: msg, args }) {
const count = Math.max(1, Math.min(25, args.count || 5));
const stats = getTopRestCallStats(5);
const stats = getTopRestCallStats(count);
const formatted = stats.map((callStats) => {
const cleanSource = callStats.source.replace(leadingPathRegex, "");
return `**${callStats.count} calls**\n${callStats.method.toUpperCase()} ${callStats.path}\n${cleanSource}`;