UNPKG

nextjs-memory-profiler

Version:

Memory leak detection and profiling tool for Next.js applications

17 lines (13 loc) 383 B
const MemoryProfiler = require("./memoryProfiler"); // Profiler'ı başlat const profiler = new MemoryProfiler({ interval: 5000, // Her 5 saniyede bir ölçüm threshold: 50, // 50MB üzeri artışlarda uyarı ver }); // Next.js server başlatıldığında profiler.start(); // Uygulama kapatıldığında process.on("SIGINT", () => { profiler.stop(); process.exit(); });