|
|
ProfilingFrom $1Profiling PHP codeAdd Profiling.php into your /includes/ folder. In LocalSettings.php, add: $wgProfiling = true; $wgDebugLogFile = 'debug.txt'; Then load any page in your wiki; debug.txt will then be populated with load times between breakpoints. To set breakpoints, add: wfProfileIn('name-profiled-code');
... CODE ...
wfProfileOut('name-profiled-code');
Profiling API times from PHPYou can also profile all the API calls by setting: $wgProfileApi = true; This will create a list of all the API calls and their execution time; you'll have to do a "View HTML Source" in your browser to see the times. There are two times reported: Total and Real. Real time is simply the time for all unique queries (this indicates a PHP inefficiency as it is making many of the same calls over).
タグ:
|