Puzzlout / TrekToursInstaller

The repository within which the applications will be installed (TrekToursApi and TrekToursFlyer repos)
GNU General Public License v3.0
0 stars 0 forks source link

Install xhprof on VS applications #7

Open WebDevJL opened 8 years ago

WebDevJL commented 8 years ago

@damirius

https://tideways.io/profiler/xhprof-for-php7-php5.6

damirius commented 8 years ago

@WebDevJL

I haven't used xhprof before, can you tell me why are we using it exactly? If we are looking for some CPU/Memory metrics Symfony comes with built in profiler. For example visit http://puzzlout.com/trektours/public/web/app_dev.php/en/contact, note 'app_dev.php' so we run it in the dev environment. You'll see profiler toolbar on the bottom, you can click on memory usage or number of ms to see some graphs and what not.

If we are going with xhprof we can also use this bundle for profiling, so that we don't modify anything in symfony's code. Of course we still need to install tideways php extension or some other for it to work

WebDevJL commented 8 years ago

@damirius

Your remark about app_dev means we are running the dev env. And I think we don't have a "refresh" script to switch in second from dev to prod and vice-versa.

I have just seen XHprof in action and liked what info it provides. Maybe Symphony profile provides the same. Assign this to me so I look at it in details.

The goal is to find weak code that could be source of slow execution or cpu intensive functions.

Thanks for the initial feedback.

Jérémie Litzer CEO @ Puzzlout http://puzzlout.com

On 11 August 2016 at 15:00, damirius notifications@github.com wrote:

@WebDevJL https://github.com/WebDevJL

I haven't used xhprof before, can you tell me why are we using it exactly? If we are looking for some CPU/Memory metrics Symfony comes with built in profiler. For example visit http://puzzlout.com/trektours/ public/web/app_dev.php/en/contact, note 'app_dev.php' so we run it in the dev environment. You'll see profiler toolbar on the bottom, you can click on memory usage or number of ms to see some graphs and what not.

If we are going with xhprof we can also use this bundle for profiling, so that we don't modify anything in symfony's code. Of course we still need to install tideways php extension or some other for it to work

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Puzzlout/TrekToursInstaller/issues/7#issuecomment-239153764, or mute the thread https://github.com/notifications/unsubscribe-auth/ADV_mnoDiEg6nV1V2efA1SIjjet744okks5qex0DgaJpZM4JeeRH .

damirius commented 8 years ago

@WebDevJL

We don't need any scripts in fact, to run the app in dev or prod mode. There are two front controllers in web directory of each project, app.php and app_dev.php. By default symfony is trying to access app.php which is run in production, manually accessing app_dev.php will run project in dev. So to take this example again http://puzzlout.com/trektours/public/web/app_dev.php/en/contact is dev, http://puzzlout.com/trektours/public/web/en/contact is prod