1

How could I setup XHProf besides my yii project in efficient way?

I don't have any problem on setting up XHProf on my app; the problem is XHProf do NOT see my application as an yii framework app; it sees it as a whole united app which its responsibility is to provdie its related profiling data for whole package and NOT just my code; (it's not ignoring codes in yii core)

So I want to know if there are any configuration in XHProf or yii for that?

Hossein Jazayeri
  • 143
  • 1
  • 12
  • What is your auto_prepend file looks like ? – sakhunzai Aug 13 '14 at 11:43
  • IMHO , I don't think Its possible to set it to ignore core lib profiling. The profiler has to hit the wall (reach the least fragment-able statement ) to calculate the cost of a path. Nor there is such configuration – sakhunzai Aug 13 '14 at 12:00
  • I don't think it's relavant but here is my config: `extension = "xhprof.so"` `[xhprof]` `xhprof.output_dir= /var/www/profile/xhprof` `auto_prepend_file = /var/www/xhprof.io/inc/prepend.php` `auto_append_file = /var/www/xhprof.io/inc/append.php` – Hossein Jazayeri Aug 14 '14 at 10:06
  • So you say if I want to profile my yii application, there is no efficent way except creating the wheel from the begining? If so, why there is no optimized version of any profiling application for each framework? or I am the lazy one here and every one could fully understand the fertilized data, xdebug or xhprof is providing for them? – Hossein Jazayeri Aug 14 '14 at 10:13
  • The right question is how do you profile code you wrote , without profiling the library ? Consider this , you extend your controller from yii base controller, much of the functionality you get is from those base classes , you cannot profile just the child class ignoring the parent. It simply not possible or applicable . – sakhunzai Aug 15 '14 at 04:45
  • Simply any function/method class that takes part in execution is part of the problem/solution so that is profiled by the xHprof. Bcz every step costs (processing /memory ).Look for other options http://stackoverflow.com/questions/2928647/profiling-php-inline – sakhunzai Aug 15 '14 at 04:52

0 Answers0