Commit graph

12 commits

Author SHA1 Message Date
Aaron
691318d0eb Only use per-template profiling for one-time profiling output.
Change-Id: Ib89ce14310ccac529684f0ada71f60744319eb3e
2012-05-05 00:34:50 +01:00
Alexandre Emsenhuber
e7ab34cf1d Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: If65d7313e1e05163ce6cc46d17daa310cb41888c
2012-04-28 20:41:55 +02:00
Tim Starling
806756e4b5 Don't call Profiler::collateData() from ProfilerSimpleUDP, it destroys $this->mCollated which was filled by profileOut(), leading to a profile with only overhead entries. Call Profiler::close() instead, like what ProfilerSimpleText does. 2011-09-20 01:28:08 +00:00
Sam Reed
3901d9c88c Stylize
+upstream Wikia changes
2011-08-17 22:38:36 +00:00
Sam Reed
c6f9ec2426 Followup r93343
Swap function_exists for MWInit::functionExists()
2011-07-28 00:28:18 +00:00
Sam Reed
cded40da01 Fix syntax error from r93343 2011-07-28 00:23:52 +00:00
Ryan Kaldari
416459559f make sure sockets are enabled 2011-07-27 23:54:21 +00:00
Alexandre Emsenhuber
21e53d3590 * Added Profiler::isStub() to check if we are using a stub profiler, instead of checking whether $wgProfiler is set
* Replaced wfProfileClose() and wfGetProfilingOutput() by direct calls to the Profiler instance and removed them, no uses in extensions
* Also removed useless params from Profiler::getOutput() call in wfLogProfilingData()
* Only generate profiling output if it'll be used; introduced Profiler::logData() that saves profiling data (database, udp, ...) to separate it from output generation
* Removed unused Profiler::getCaller(), not used at all, and we have wfGetCaller() that does the same thing
2011-04-21 16:31:02 +00:00
Chad Horohoe
5a6d1ee2d3 More profiler cleanup:
* Move autoloader up a little bit so the profiler classes can use it
* Make Profiler into a singleton so it's lazy-constructed, $wgProfiler is now a configuration array (used 'visible' in ProfilerSimpleText as an example of other globals we can move into this array). If $wgProfiler is set to an object, it'll use that for back-compat
* Maintenance: rather than setting up the profiler and then disabling it, just disable it from the start
* Kill $wgProfiling -> now that ProfilerStub overrides profileIn() and profileOut(), it's not needed
* dumpHTML needs some fixes still
2011-04-16 19:00:54 +00:00
Chad Horohoe
e376ee65f7 First step of reorganizing profiling files:
* Move them all to includes/profiling/* - If you're using StartProfiler, you'll need to update that
* Make ProfileStub subclass the Profiler rather than duplicating function definitions conditionally
* Removed unused params to wfGetProfilingOutput(), only used in the stub, and they didn't do anything with them
* TODO: Kill $wgProfiling, make $wgProfiler a config array and move the various options to that. Also make into a singleton, rather than global (not much calls it outside of core)
2011-04-16 02:19:40 +00:00
Sam Reed
035218f403 Revert r74913, caused many problems, and was only likely to cause more in the future 2010-10-17 21:18:04 +00:00
Sam Reed
47b13d184c Move profiler stuff to own folder, updater AutoLoader to match
ProfilerSimpleTrace isn't in AutoLoader. Neither is ProfilerStub

Profiler also says " * This file is only included if profiling is enabled"...
2010-10-17 19:04:05 +00:00
Renamed from includes/ProfilerSimpleUDP.php (Browse further)