eelyroc Posted June 22, 2009 Share Posted June 22, 2009 I am using PEAR's benchmark tool to benchmark execution times of some functions, and I'd like to store that somewhere. What is the best way to log it on the production server? Link to comment https://forums.phpfreaks.com/topic/163279-best-way-to-log-benchmark/ Share on other sites More sharing options...
flyhoney Posted June 22, 2009 Share Posted June 22, 2009 I dont think there is one best way, it really depends on what you are doing. The two obvious choices are logging to a file or logging to a database. Logging to a database in most cases would be faster. I would closely analyze exactly what information you are hoping to retrieve and focus on that. If your application is already a database driven application it should be simple to add a log table that you can write performance benchmarks to (just make sure you garbage collect or it could get really big!). Alternatively you can write performance data to a file, however this is harder to do as multiple processes are going to want to access the file. You will need to use some sort of semaphore to assure that only one process rights to the log at a time. Link to comment https://forums.phpfreaks.com/topic/163279-best-way-to-log-benchmark/#findComment-861559 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.