From 2f1c0ba2d4673dc1032fc7492e7c76ae03a109cb Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 12 Mar 2026 21:52:34 +0100 Subject: [PATCH] Gateway: include entity counts in trace names --- src/gateway/opcodes/Identify.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 9b2620e77..d5b47dcdb 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -376,23 +376,23 @@ export async function onIdentify(this: WebSocket, data: Payload) { //channels g.channels = memberGuildChannels.filter((c) => c.guild_id === m.guild_id); - trace.calls.push("filterChannels", { micros: sw.getElapsedAndReset().totalMicroseconds }); + trace.calls.push(`filterChannels(${g.channels.length}/${memberGuildChannels.length})`, { micros: sw.getElapsedAndReset().totalMicroseconds }); //emojis g.emojis = memberGuildEmojis.filter((e) => e.guild_id === m.guild_id); - trace.calls.push("filterEmojis", { micros: sw.getElapsedAndReset().totalMicroseconds }); + trace.calls.push(`filterEmojis(${g.emojis.length}/${memberGuildEmojis.length})`, { micros: sw.getElapsedAndReset().totalMicroseconds }); //roles g.roles = memberGuildRoles.filter((r) => r.guild_id === m.guild_id); - trace.calls.push("filterRoles", { micros: sw.getElapsedAndReset().totalMicroseconds }); + trace.calls.push(`filterRoles(${g.roles.length}/${memberGuildRoles.length})`, { micros: sw.getElapsedAndReset().totalMicroseconds }); //stickers g.stickers = memberGuildStickers.filter((s) => s.guild_id === m.guild_id); - trace.calls.push("filterStickers", { micros: sw.getElapsedAndReset().totalMicroseconds }); + trace.calls.push(`filterStickers(${g.stickers.length}/${memberGuildStickers.length})`, { micros: sw.getElapsedAndReset().totalMicroseconds }); //voice states g.voice_states = memberGuildVoiceStates.filter((v) => v.guild_id === m.guild_id); - trace.calls.push("filterVoiceStates", { micros: sw.getElapsedAndReset().totalMicroseconds }); + trace.calls.push(`filterVoiceStates(${g.voice_states.length}/${memberGuildVoiceStates.length})`, { micros: sw.getElapsedAndReset().totalMicroseconds }); //total trace.micros = totalSw.elapsed().totalMicroseconds;