今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Installing webgrind for profiling
- [Instructor] One of Xdebug's feature is a profiler, which analyzes program execution. The profiler generates files that can be analyzed with third party tools such as webgrind, which I'll demonstrate. Profiling is even slower than the regular Xdebug performance impact. Therefore, this feature is off by default. We have the option to turn it on all of the time, but that's really not a good idea. There's a more reasonable alternative, on demand, where we can selectively enable profiling for a single page load. Let's start by enabling the trigger for profiling. From the terminal, let's edit the Xdebug configuration. Sudoedit and it's in etc/php/7.0/mods-available and then the file name, xdebug.ini. We're going to add two lines, so press down. First, we'll allow the profiler to be triggered manually. Type xdebug.profiler_enable_trigger equals one and the second, xdebug.profiler_output_dir will be where the profiler will be riding, which will be /tmp/cachegrind. When complete, press…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。