Thread:Project:Support desk/自己在公司内部搭建的media wiki，每次编辑完后点提交时大约要5秒左右的响应时间/reply (5)

Here are the steps:


 * Rename the file StartProfiler.sample to StartProfiler.php.
 * In this file: Make sure that the profiler is used: Set $wgProfiler['class'] to "Profiler" like so:
 * ''$wgProfiler['class'] = 'Profiler';
 * It should not be set to "ProfilerStub".

// Path to your log file. Adjust this line! $wgDebugLogFile = '/var/www/mediawiki/path/to/my/logfile/Logfile.log';
 * In LocalSettings.php, at the end of the file, add this:

// Only record profiling info for pages that took longer than this $wgProfileLimit = 0.0; // Don't put non-profiling info into log file $wgProfileOnly = false; // Log sums from profiling into "profiling" table in db $wgProfileToDatabase = false; // If true, print a raw call tree instead of per-function report $wgProfileCallTree = false; // Should application server host be put into profiling table $wgProfilePerHost = false; // Settings for UDP profiler $wgUDPProfilerHost = '127.0.0.1'; $wgUDPProfilerPort = '3811'; // Detects non-matching wfProfileIn/wfProfileOut calls $wgDebugProfiling = false; // Output debug message on every wfProfileIn/wfProfileOut $wgDebugFunctionEntry = 0; // Lots of debugging output from SquidUpdate.php $wgDebugSquid = false;

Save a wiki page.

Check the logfile.

We need the information from the according request. This information will contain a table with percentages. This is what we need!