Reputation: 2054
X debug is returning output as parts instead of just one file. I am using ubuntu 16 and don't know why suddenly the output is in several files. The problem that i have is that i cannot open this files in Kcachegrind as the output have different parts in separated files. Anyone? Thanks in advance
Upvotes: 4
Views: 4405
Reputation: 451
With the default configuration xdebug creates one file per PID.
when you profile a website with ajax calls, the browser will make more than one request, and maybe these are processed by different PIDs/Instances of your webserver and so you get multiple files.
you could check your php.ini. there are multiple xdebug settings to control how the profiling data is stored. for example:
xdebug.profiler_aggregate: Type: integer, Default value: 0 When this setting is set to 1, a single profiler file will be written for multiple requests. One can surf to multiple pages or reload a page to get an average across all requests. The file will be named .cachegrind.aggregate. You will need to move this file to get another round of aggregate data.
xdebug.profiler_append: Type: integer, Default value: 0 When this setting is set to 1, profiler files will not be overwritten when a new request would map to the same file (depending on the xdebug.profiler_output_name setting. Instead the file will be appended to with the new profile.
xdebug.profiler_output_name Type: string, Default value: cachegrind.out.%p
This setting determines the name of the file that is used to dump traces into. The setting specifies the format with format specifiers, very similar to sprintf() and strftime(). There are several format specifiers that can be used to format the file name.
see more in the xdebug documentation
the other option is to use the File/Add menu in KCachegrind:
Adds a profile data file to the current window. By this, you can force multiple data files to be loaded into the same toplevel window even if they are not from the same run as given by the profile data file naming convention.
Upvotes: 5