Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aggregate PHP XDebug data with KCacheGrind

Is there any way to aggregate profile data previously taken by PHP XDebug?

I have managed PHP XDebug to put the data related to one request to single file. When I open that file in kcachegrind, it displays all the requests aggregated in that file. However, each request has its own stack trace (I understand, it may change). Is there any way to see profile data aggregated from all the requests? I don't care if it's not 100 % accurate or if some calls are missing, I just need the brief overview over all daily operations.

Disclaimer: kcachegrind is not requirement, I just found it the best tool so far.

like image 204
Pavel S. Avatar asked Aug 13 '12 12:08

Pavel S.


1 Answers

Combine all files into one:

cat cachegrind.out.* > cachegrind.combined

Open the cachegrind.combined and select "Parts" tab on bottom right of the window. You will see multiple parts of profile listed there. Select them all (CTRL+a or use mouse) and you will see summed data of all these profile files.

like image 108
Tadas Sasnauskas Avatar answered Sep 26 '22 02:09

Tadas Sasnauskas