[core] add cpu profiling for troubleshooting

This commit is contained in:
devlikepro committed 2025-11-28 14:02:10 +07:00
1 parent a58be84e56
commit 35e9418988
3 files changed
+80 -2

No files matched your search

+10
View File
@@ -70,6 +70,16 @@ else
fi
fi
#
# Enable CPU profiling
#
if [ "$WAHA_DEBUG_MODE" = "true" ] || [ "$WAHA_DEBUG_MODE" = "True" ] || [ "$WAHA_DEBUG_MODE" = "1" ]; then
case " $NODE_OPTIONS " in
*" --cpu-prof "*) ;;
*) export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--cpu-prof" ;;
esac
fi
#
# Start your application using node with exec to ensure proper signal handling
#