DiZeroX
DiZeroX
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by DiZeroX on 12/4/2024 in #djs-questions
Memory profiling with sharding
When using the ShardingManager, using node's memory profiler (node --inspect index.js) only shows the memory usage of the index.js file. It does not show memory usage of the bot.js file, that is spawned from the ShardingManager. How would I go about profiling the memory usage of bot.js?
import { ShardingManager } from 'discord.js';

const manager = new ShardingManager('./dist/bot.js', {
token: process.env.DISCORD_TOKEN,
});

manager.on('shardCreate', (shard) => console.log(`Launched shard ${shard.id}`));

void manager.spawn();
import { ShardingManager } from 'discord.js';

const manager = new ShardingManager('./dist/bot.js', {
token: process.env.DISCORD_TOKEN,
});

manager.on('shardCreate', (shard) => console.log(`Launched shard ${shard.id}`));

void manager.spawn();
Node: 20.18.0 Discord.js: 14.16.3
3 replies
SIASapphire - Imagine a framework
Created by DiZeroX on 7/8/2024 in #sapphire-support
Help with manually setting path for stores
No description
5 replies