* Replaced use of spl hash with random transaction IDs.
These can be correlated better and make the DBPerformance
log easier to make sense of. They are also shorter.
Change-Id: I5f49c0d0c26e37807341bbc83b1b41b124164419
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I0056b4a8df243cfc0c5f25378de48f7a35170aca
* Factored a ProfilerStandard class out of Profiler
* Profiler is now an abstract base class
* For b/c, using Profiler as the profiler switches to ProfilerStub
to avoid trying to instantiate an abstract class
* Also factored out a small TransactionProfiler class
* Fixed fatal in "new ProfilerStub()" line in getInstance();
Profiler has long since type hinted $params as an array
* Removed bogus debug var usage left in ProfilerMwprof::getRawData()
* Removed useless mTimeMetric stuff
Change-Id: I854dabba6c8b1fb7d92baca59ebd4af25878d11d
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: Iced714bca004756b461b66067a49a925a7e3b877
* Merged the "collate at end" and "running collate" logic
into the base class to make it more unified and consistent.
* Pulled out DB code into ProfilerSimpleDB class.
* Removed the ProfilerSimple class and updated child classes.
* Made ProfilerSimpleTrace set the debug information too.
* Work around "ended by close()" bug from 99aef03f. Since the
getRawData() method gets called while some wfProfileOut() calls
have not yet happened, make it use the matched call data and let
the final logData() method work on the full data as normal.
* Let ProfilerSimple classes use getFunctionReport() for the profiler
debug log if it is setup instead of making it just return "".
* Made getRawData() work as best as possible with ProfilerMwprof.
* Removed $wgProfileToDatabase since it is now useless.
* Improved DB profile performance with sqlite.
* Updated visibility of various methods.
Change-Id: I1260bab2b5ba12dccbba701bcae4a637cb85c6e8
This adds a new pane for the debug toolbar labeled Profiler. It groups
together events sent to wfProfileIn/Out and draws a timeline giving a
visual representation of what the page was doing at a particular point
in time. Hovering over a timeline brings up a flyout about the contained
events.
Depends on I08854d80f57286129f19cb14566f84ed3c7fa21c for proper positioning
of the flyout.
Change-Id: I23a0ce4137abcd74ad87967fb263214c08cb9685
Easier to catch them than if they are in the default debug log.
Added Profiler::debugGroup() as wrapper to wfDebugLog(), as
there already is Profiler::debug() for wfDebug(), so that
there won't be a fatal error if the error happens before the
inclusion of GlobalFunctions.php and converted other calls
to wfDebugLog() to use it.
Change-Id: Ie8481a2e13a94efa0248dd5a36b6b1a22811817e
The Line continuation Coding conventions prefers the closing parenthesis
on the same line than the beginning curly braces. This is done for ifs
and functions.
Also move some boolean operator from the end of a line to the beginning
and changed some indentation to make the condition hopefully better
readable.
Change-Id: Id0437b06bde86eb5a75bc59eefa19e7edb624426
Also removed some unnecessary ones. I think I've caught them all.
The spaceless version already appears in core ~300 times (after
accounting for false positives when grepping). Some consistency would
be nice.
Change-Id: I607655b5f4366e66dc78730d5fd2f57ed8776cae
* This dumps profiling information in list or trace format as specified.
* Also optimized wfProfile* function like the ProfileSection class, which
also plays better with Profiler::setInstance().
* Fixed fatals due to wfDebug() calls in Profiler::instance() due to that
function not yet being loaded. The calls were simply removed.
* Cleaned up file performance test script a bit.
Change-Id: I6b8cd8b30fefc1904eeeeacada7a30a46f62fe2a
Added spaces after/before parenthesis
Removed unneeded parenthesis around some statements
Broke a long line
Change-Id: I7fbe129f7bbf524dd0598ece2a9708643f08453b
hphpc has been superseded by hhvm, so support for hphpc is no longer
needed.
* Continue to use Preprocessor_Hash under HipHop since it is still
faster under hhvm
* Keep $wgCompiledFiles for now, so that wikihiero doesn't give an error
before Ic9d1e795 is merged
* Migrate the run-server script and associated configuration file to
hhvm. Enable EnableStaticContentFromDisk since it doesn't seem
ridiculously inefficient at first glance. Run from $IP rather than
$IP/.. since hhvm is apparently not picky about sourcing files from
outside of the current directory.
Change-Id: Ic3e769f1fbad4f7ad26dd819406796fee48c6b45
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays
Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments
Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
* Added $metric parameter to Profiler::getTime() and
Profiler::getInitialTime() so that the time calculating method can be
easily overriden
* Added 'cpu' time metric (for ProfilerSimple)
* Made Profiler::getInitialTime() protected so that it can be used by
ProfilerSimple and ProfilerSimpleTrace
Change-Id: I12d1bcb43ec179396a3f8ed46ba4128412e2f65b
* Add some debugging output to bad profiler config
* Make member variables all protected, nothing uses them outside of Profiler and its subclasses
* Allow setting $mProfilerID from the config
** Don't try to set a global variable in the same file as a class definition (Profiler.php). Set it in WebStart.php instead.
** In StartProfiler.sample, don't use require_once() to get ProfilerStub.
* Removed the setproctitle() stuff from ProfilerStub, the extension is not maintained and doesn't work with Apache 2.x
* Added an optimisation to wfProfileIn() and wfProfileOut() to reduce the overhead when profiling is not enabled
* Added the ability to configure in StartProfiler.php whether CPU time or wall-clock time is used, avoiding recompilation