mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-06 18:47:20 +00:00
wip debug/clinic js
This commit is contained in:
parent
025e67d6b6
commit
501b80f4a4
6 changed files with 50 additions and 6 deletions
22
backend/start-api-prod-debug.js
Normal file
22
backend/start-api-prod-debug.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
const ClinicHeapProfiler = require('@clinic/heap-profiler');
|
||||
|
||||
const heapProfiler = new ClinicHeapProfiler({
|
||||
name: `api-${Date.now()}`,
|
||||
collectOnFailure: true,
|
||||
});
|
||||
|
||||
console.log("Starting API with heap collection");
|
||||
heapProfiler.collect([
|
||||
"node",
|
||||
"-r",
|
||||
"./register-tsconfig-paths.js",
|
||||
"--unhandled-rejections=strict",
|
||||
"--enable-source-maps",
|
||||
"--stack-trace-limit=30",
|
||||
"dist/backend/src/api/index.js"
|
||||
], function (err, filepath) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
console.log(`Saved collected data in ${filepath}`);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue