This has no usage in core or in Codesearch Everywhere.
The creation of logical profile entries (such as for templates in
the parser, and for DB queries) remains supported and this is how
the class is used in core. Capturing detailed traces is only supported
via implementations like ProfilerXhprof and ProfilerExcimer.
Bug: T305100
Change-Id: Ib06ec25bfa1f9565ce85b54e8375c0a5f99a912a
* Use the "profiler" channel consistently within this component,
and set it in the constructor of the base classes.
* Fold legacy "profilererror" channel into "profiler".
Previously, the wfDebugLog wrapper was using the INFO severity,
which is the default given wfDebugLog does not support severity.
Change-Id: I1e7dcbc221b395a4ea792e18f4d4da36b5ee40df
Follows-up I2d35bfddfcc4c194aa7.
Also add a second check for is_array on end to please static analysis.
Change-Id: Ie8cf4bb1a6e64479cc411f049d7aab08570e6aa1
* Remove redundant file description for files that only define
a class where the class description suffices.
* Ensure the file has a license header and @file.
* Remove any @ingroup from the file comment block.
These clutter the Doxygen pages with duplicate entries.
* Ensure the class block has an @ingroup set.
* Remove @since when @internal is set.
* Add any missing @since to public classes that were created
recently enough to easily find out when:
- ProfilerExcimer was introduced in 1.33 (6373e3d1d4).
Change-Id: I6b18289a15a3085857acd7c9004ec819f7914b29
These are almost only doc changes, with two exceptions:
1-In LinkHolderArray, int-alike array keys are now cast to int, to be uniform with what we do in other code paths
2-In ExtensionRegistration, changed a line to throw an Exception
immediately, instead of an ExtensionDependencyError. This is because the
latter takes an array with msg and type, but we were passing it a plain
string (and in fact the code was bugged).
Bug: T231636
Change-Id: I8b0ef50d279c2a87490dde6a467a4e22c0710afd
When SectionProfiler::getFunctionStats() is called, the 'start'
and 'end' member variables may be null if no code called the
scopedProfileIn()/scopedProfileOut() methods on this profiler instance.
This can occur, for instance, when generating the parser limit report
for wikitext that did not include expensive parser functions.
In PHP 7.4, attemping to use a null value as an array generates
a PHP Notice.[1] This patch adds a check to SectionProfiler::getFunctionStats
to verify that the 'start' value is an array before attempting to
access its keys.
---
[1] https://github.com/php/php-src/blob/php-7.4.0RC1/UPGRADING#L25
Bug: T233012
Change-Id: I2d35bfddfcc4c194aa71265e40387f2f2914e3a5
- mostly auto fixes
- some too long lines fixed
- ignore amp space in one case passing by reference
Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
Avoids "Argument 1 passed to Profiler::scopedProfileOut() must
be an instance of ScopedCallback, SectionProfileCallback given"
Change-Id: I92713de71df9722d8a5d7e5cd04460aff71cf096
The ScopedCallback class was moved into a separate library. This updates
all callers to use the namespaced version, and provides a
backwards-compatibility class wrapper under the old name.
Bug: T146258
Change-Id: I2dd0a66fe2f510f26bdfef6b0a975c1beb3fd93c
Depends-On: Iea0c40bdd7776372ccf72db8f088a2abaa4d3721
* Previously it assumed methods never overlapped.
* Also fixed running collation when in trace mode.
Change-Id: I6cbf5384a57ea68197495173d75732f5df328040
- Added/removed spaces around parenthesis
- Added newline in empty blocks
- Added space after switch/foreach/function
- Use tabs at begin of line
- Add newline at end of file
Change-Id: I244cdb2c333489e1020931bf4ac5266a87439f0d
* Added a standard getFunctionStats() method for Profilers to return
per function data as maps. This is not toolbar specific like getRawData().
* Cleaned up the interface of SectionProfiler::getFunctionStats() a bit.
* Removed unused cpu_sq, real_sq fields from profiler UDP output.
* Moved getTime/getInitialTime to ProfilerStandard.
Co-Authored-By: Aaron Schulz <aschulz@wikimedia.org>
Change-Id: I266ed82031a434465f64896eb327f3872fdf1db1