Merge remote-tracking branch 'origin/dev' into Dev-Carl

This commit is contained in:
Carl Mahnke
2025-06-03 11:07:14 +02:00
7 changed files with 69 additions and 315 deletions

View File

@@ -0,0 +1,19 @@
---
import { getHeapSnapshot } from "v8";
import * as fs from "fs";
// Create a named heap snapshot
const snapshotStream = getHeapSnapshot();
const fileName = `heap-${Date.now()}.heapsnapshot`;
const fileStream = fs.createWriteStream(fileName);
snapshotStream.pipe(fileStream);
fileStream.on("finish", () => {
console.log(`Heap snapshot saved to ${fileName}`);
});
fileStream.on("error", (err) => {
console.error("Error writing heap snapshot:", err);
});
---