Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1a389dc17 | ||
|
|
d724958dec | ||
|
|
950031bbaf |
No files matched your search
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## 3.0.1 - 2019-01-09
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- fatal error when HTTP request is pre–filtered
|
||||||
|
|
||||||
## 3.0 - 2018-12-28
|
## 3.0 - 2018-12-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -47,11 +47,6 @@
|
|||||||
],
|
],
|
||||||
"symfony/stopwatch": [
|
"symfony/stopwatch": [
|
||||||
"Tests"
|
"Tests"
|
||||||
],
|
|
||||||
"twbs/bootstrap" : [
|
|
||||||
"docs",
|
|
||||||
"grunt",
|
|
||||||
"js/tests"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Plugin Name: Laps
|
|||||||
Plugin URI: https://github.com/Rarst/laps
|
Plugin URI: https://github.com/Rarst/laps
|
||||||
Description: Light WordPress profiler.
|
Description: Light WordPress profiler.
|
||||||
Author: Andrey “Rarst” Savchenko
|
Author: Andrey “Rarst” Savchenko
|
||||||
Version: 3.0
|
Version: 3.0.1
|
||||||
Author URI: https://www.rarst.net/
|
Author URI: https://www.rarst.net/
|
||||||
Text Domain: laps
|
Text Domain: laps
|
||||||
Domain Path: /lang
|
Domain Path: /lang
|
||||||
|
|||||||
@@ -35,16 +35,16 @@ class Http_Collector extends Stopwatch_Collector {
|
|||||||
/**
|
/**
|
||||||
* Capture start time of HTTP request
|
* Capture start time of HTTP request
|
||||||
*
|
*
|
||||||
* @param boolean $false Whether to preempt an HTTP request's return value. Default false.
|
* @param false|array|\WP_Error $false Whether to preempt an HTTP request's return value. Default false.
|
||||||
* @param array $args HTTP request arguments.
|
* @param array $args HTTP request arguments.
|
||||||
* @param string $url The request URL.
|
* @param string $url The request URL.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function pre_http_request( bool $false, array $args, string $url ): bool {
|
public function pre_http_request( $false, array $args, string $url ) {
|
||||||
|
|
||||||
$this->start( $url, 'http' );
|
$this->start( $url, 'http' );
|
||||||
$this->callers[ $url ] = wp_debug_backtrace_summary( __CLASS__, 5, true );
|
$this->callers[ $url ] = wp_debug_backtrace_summary( __CLASS__, 5 );
|
||||||
|
|
||||||
return $false;
|
return $false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class Stopwatch_Record implements Record_Interface {
|
|||||||
public function get_description(): string {
|
public function get_description(): string {
|
||||||
|
|
||||||
$duration = round( $this->stopwatch_event->getDuration() );
|
$duration = round( $this->stopwatch_event->getDuration() );
|
||||||
$memory = $this->stopwatch_event->getMemory() / 1024 / 1024;
|
$memory = round( $this->stopwatch_event->getMemory() / 1024 / 1024, 2 );
|
||||||
$description = '' !== $this->description ? "<hr />{$this->description}" : '';
|
$description = '' !== $this->description ? "<hr />{$this->description}" : '';
|
||||||
|
|
||||||
return "{$this->name} – {$duration} ms – {$memory} MB{$description}";
|
return "{$this->name} – {$duration} ms – {$memory} MB{$description}";
|
||||||
|
|||||||
Reference in new issue
Block a user