-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(profiler): allow capture/display of crude profiling data
Via `$CONFIG` options, sites can enable the display of profiling data in the JavaScript console. Data is available as a tree or a flattened list sorted by duration. Times available: - each callable in system events (e.g. `file_init` and `aalborg_theme_pagesetup`) - total time to run start.php for all plugins - from routing to `elgg_view_page` ("how long to generate the body of the page") - `elgg_view_page` - `elgg_view_layout` - various boot functions - (optional) timing each query Fixes #9293
- Loading branch information
Showing
16 changed files
with
530 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
namespace Elgg; | ||
|
||
/** | ||
* Make an object accept a timer. | ||
* | ||
* @access private | ||
*/ | ||
trait Profilable { | ||
|
||
/** | ||
* @var Timer|null | ||
*/ | ||
private $timer; | ||
|
||
/** | ||
* Set a timer that should collect begin/end times for events | ||
* | ||
* @param Timer $timer Timer | ||
* @return void | ||
*/ | ||
public function setTimer(Timer $timer) { | ||
$this->timer = $timer; | ||
} | ||
} |
Oops, something went wrong.