[core] add cpu profiling for troubleshooting
This commit is contained in:
1 parent
a58be84e56
commit
35e9418988
3 files changed
+80
-2
No files matched your search
@@ -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
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user