The best part about xhprof is that it's even fit enough to be run in production. It doesn't matter if it's run on the cli or via another sapi (like fpm or fcgi or even the Apache module). It allows to define steps in the code and reports time, memory usage, server load etc between two steps. If you are curious, this is just an old version of a CMS I wrote for my own use. ![]() For example, you could optimize one function to take half the amount of time, but your efforts would be better served optimizing a function that is called dozens if not hundreds of times during a page load. You want to target the things that take the most amount of time. That should provide ample details about how efficent your PHP script it. ![]() Xdebug.profiler_output_name=callgrind.%t_%R.outĪnd here is a screenshot of a. Xdebug.profiler_output_dir=h:\xampp\cachegrind Zend_extension = h:\xampp\php\ext\php_xdebug-2.1. Xdebug can be a bit tricky to configure so here is the relevant section of my php.ini for reference: You will want to look at Xdebug and more specifically, Xdebug's profiling capabilities.īasically, you enable the profiler, and every time you load a webpage it creates a cachegrind file that can be read with WinCacheGrind or KCacheGrind. Hopefully all of the above can help show that carefully isolated 'lab' testing will not reflect the variables and problems that you will encounter in production, and that you must identify what your high level goal is and then what you can do to get there, before heading off down the micro/premature-optimisation route to hell. The former can be helped by doing things like gzipping all resources sent to the browser, yet doing so could (in some circumstances) push you further away from the achieving the latter. Possible with smallest CPU consumption the goal? Is getting each request to the server thrown back out as quickly as.Is the speed with which the page renders in the users browser the.The next thing to consider is what you are trying to optimise for? What web server are you using? As an example, I can make nginx + PHP-FPM seriously out perform mod_php + Apache, which in turn gets trounced for serving static content by using a good CDN. You also need to look beyond just the code you are running in your scripts to how your scripts/pages are being served. ![]() This raises another question: are you bottlenecking on CPU? RAM? I/O? The results of any one single page load aren't going to be as relevant as seeing how your code performs while the server is getting hammered to do a million other things as well and resources become scarce. Xdebug is great for when you're working in dev/staging, and XHProf is a great tool for production and it's safe to run it there (as long as you read the instructions). This script also has an Email option to send the account verification emails and password reset emails to the users.If you actually want to benchmark real world code, use tools like Xdebug and XHProf. This admin panel has all the options to manage the entire application. This online exam PHP script has a very easy to use admin panel with the admin panel you can easily manage the Category, Exams, Users. The mock test contains an option to add explanations to the answer that will help the user to understand the answer well anyway this is an option if you don’t want to show any explanation you can leave it When the time is over the exam will be submitted automatically Also, the exam screen contains the count down timer. ![]() This will help the participants to quickly find the exam overviewĪnd the next two sections contain the question and the answer. The second section shows the statics about the exam it shows the total no question, no of questions answers, and also it shows the number of unanswered questions. The most attractive thing about the script the exam screen contains four different sections with the first section on the exam screen the users can easily navigate between the different question and also the unanswered questions are collared in gray color and answered questions are highlighted in green color and the questions added for review are highlighted in blue color that will help the participants to navigate through the different questions If the user has an account all the exam results are saved in the user account for feature references at the same time user login is not mandatory if the user wants to continue as the guest he can take the exam as the Guest and view the results but the exam details are not saved This script has an option for user login and registration. This script has an option to add an image with the questions and also you can add images in the choices too. This has a beautiful result page it will instantly show as soon as the user finishes the exams. This script is designed to use both online mock tests and regular online tests. Best online exam PHP with a lot of cool features.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |