github.com/drud/ddev@v1.21.5-alpha1.0.20230226034409-94fcc4b94453/pkg/ddevapp/global_dotddev_assets/commands/web/xhprof (about) 1 #!/bin/bash 2 3 ## #ddev-generated 4 ## Description: Enable or disable xhprof 5 ## Usage: xhprof on|off|enable|disable|true|false|status 6 ## Example: "ddev xhprof" (default is "on"), "ddev xhprof off", "ddev xhprof on", "ddev xhprof status" 7 ## ExecRaw: false 8 ## Flags: [] 9 10 if [ $# -eq 0 ]; then 11 enable_xhprof 12 exit 13 fi 14 15 case $1 in 16 on | true | enable) 17 enable_xhprof 18 ;; 19 off | false | disable) 20 disable_xhprof 21 ;; 22 status) 23 status=$(php -m | grep 'xhprof') 24 if [ "${status}" = "xhprof" ]; then 25 result="xhprof is enabled" 26 else 27 result="xhprof is disabled" 28 fi 29 echo $result 30 ;; 31 *) 32 echo "Invalid argument: $1" 33 ;; 34 esac