Profiling with XHProf


Comments are closed.

Great presentation. Will definitely be implementing XHProf.

Anonymous at 09:50 on 31 Oct 2014

You recommend running this in production? Also what is the best way to clean the database? Just truncate all the tables?

XHProf can definately be used in production, that is what I would say it is intended for. However I would not recommend profiling every request, every 10th request is more than enough for most sites, for particularly busy sites, even every 100th request should be sufficient.

When it comes to clearing out the database, truncating table (there is only one table XHProf uses) is certainly the easiest way, but you loose all history. One suggestion is to delete all data past 90 days, or delete 90% of data past 90 days.