![]() Selected one, again either direct or indirect. Similar except that it shows information on functions called from the current The number in parentheses is the median distance. If there areĭifferent distances between two functions, it is shown as a range (for example The "Distance" column shows how many functionĬalls are between the listed and the current selected one (-1). The upper pane in the screenshot on the left shows all functions calling theĬurrent selected one, both directly and indirectly with other functions Which the function was called respectively all directly madeįunction calls but also function calls made more levels up and down. The "All Callers" and "All Calls" tabs show not only the direct calls from Selected function itself will also takes time to execute. The numbers in this list up, you will most likely never reach 100% as the Pane shows the time spent while calling the function from the list. In the Cost column added up will always be 100%. Selected function while being called from the function in the list. The "Cost" column in the upper pane shows the time spent in the current The lower pane shows information about the functions that the current selected ("eztemplatedesignresource->executecompiledtemplate in the screenshot). Shows information about which functions called the current selected function The pane on the right contains an upper and lower pane. Switch between the two modes with the button you see on the right. The numbers in the first two columns can beĮither percentages of the full running time of the script (like in theĮxample) or absolute time (1 unit is 1/1.000.000th of a second). In the screenshot on the left you can see thisįor "include::/home/httpd/ez_34/v." and an example of an internal PHP (and include_once, require and require_once) are followed by "::" and theįilename of the included file. "php::" and include files are handled in a special way too. XdebugĬhanges internal PHP function names by prefixing the function name with The second column "Self" shows the time spent in this function (without itsĬhildren), the third column "Called" shows how often a specific function wasĬalled and the last column "Function" shows the name of the function. ![]() Pane showing all functions in your script sorted by time spent in this function, On the left side you find the "Flat Profile" Once the file is opened you have plenty of information available in theĭifferent panes of KCacheGrind. ![]() Analysing Profiles #Īfter a profile information file has been generated you can open it with Holds the profiling information for that request. This header contains the name of the file that Xdebug adds the HTTP header X-Xdebug-Profile-Filename to a The Chrome, Firefox, and SafariĮxtensions that can be used to enable the step debugger (see HTTP Debug Sessions) can also be used with The profiler by using an environment value, a GET/POST parameter, or COOKIE Xdebug.start_with_request#trigger to trigger. You can also selectively enable the profiler by setting Generated by the profiler can be enormous for complex scripts. You have enough space in your xdebug.output_dir as the amount of information You canĬhange the filename format with xdebug.profiler_output_name. The name of the generated fileĪlways starts with " cachegrind.out." and ends byĭefault with the PID (process ID) of the PHP (or Apache) process. Instructs Xdebug to start writing profiling information into the directoryĬonfigured with the xdebug.output_dir directive. Please refer to Configure PHP in the documentation to Starting The Profiler #ĭistribution specific PHP ini file, change (or set) the xdebug.mode setting to Package also comes with a perl script "ct_annotate" which produces ASCII outputįrom the profiler trace files. In case you can not use KDE (or do not want to use KDE) the kcachegrind There is also a web based front-end called Webgrind. If you are on Mac OSX, homebrew has a formula for QCacheGrind. (QCacheGrind is KCacheGrind without KDE bindings). If you are on Windows, there are precompiled QCacheGrindīinaries available. You can install KCacheGrind with your favourite package manager. Tool (Linux, KDE) to analyse your profiling data. Profiling information in the form of a Cachegrind compatible file. ![]() Information about how much memory is being used, and which functions and Your PHP code and determine bottlenecks or generally see which parts of yourĬode are slow and could use a speed boost. Xdebug's Profiler is a powerful tool that gives you the ability to analyse Script and visualize those with an external tool such as KCacheGrind or Xdebug's built-in profiler allows you to find bottlenecks in your
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |