mfg
This commit is contained in:
34
.ddev/.global_commands/web/xhprof
Executable file
34
.ddev/.global_commands/web/xhprof
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
## #ddev-generated
|
||||
## Description: Enable or disable xhprof
|
||||
## Usage: xhprof on|off|enable|disable|true|false|status
|
||||
## Example: "ddev xhprof" (default is "on"), "ddev xhprof off", "ddev xhprof on", "ddev xhprof status"
|
||||
## ExecRaw: false
|
||||
## Flags: []
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
enable_xhprof
|
||||
exit
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
on | true | enable)
|
||||
enable_xhprof
|
||||
;;
|
||||
off | false | disable)
|
||||
disable_xhprof
|
||||
;;
|
||||
status)
|
||||
status=$(php -m | grep 'xhprof')
|
||||
if [ "${status}" = "xhprof" ]; then
|
||||
result="xhprof is enabled"
|
||||
else
|
||||
result="xhprof is disabled"
|
||||
fi
|
||||
echo $result
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user