Skip to content

Commit

Permalink
Add timing functions to Logger class
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbennett committed Aug 4, 2016
1 parent 1eaa698 commit eea025f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions libraries/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ class Logger {
*/
private function __construct() {}

public static function getTimingHeader($tags = true) {
// If $tags is true, then <script> will be included
if (extension_loaded("newrelic")) {
return newrelic_get_browser_timing_header($tags);
} else {
return "";
}
}

public static function getTimingFooter($tags = true) {
// If $tags is true, then <script> will be included
if (extension_loaded("newrelic")) {
return newrelic_get_browser_timing_footer($tags);
} else {
return "";
}
}

public static function getTraceString() {
ob_start();
debug_print_backtrace();
Expand Down

0 comments on commit eea025f

Please sign in to comment.