performance-x / xhprof-data-processor
Enhances XHProf profiling data by adding detailed function signatures including parameter types
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/performance-x/xhprof-data-processor
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^9.5
README
Enhances XHProf profiling data by adding detailed function signatures including parameter types while keeping class names short and readable.
Installation
composer require performance-x/xhprof-data-processor
Usage
use PerformanceX\XHProfProcessor\XHProfDataProcessor; $processor = new XHProfDataProcessor(); $processed_data = $processor->process($xhprof_data);
Example
Input:
[
"main()" => [
"ct" => 1,
"wt" => 100
],
"SomeClass::method==>strlen" => [
"ct" => 1,
"wt" => 50
]
]
Output:
[
"main()" => [
"ct" => 1,
"wt" => 100
],
"SomeClass::method(User $user, array $data)==>strlen(string $string)" => [
"ct" => 1,
"wt" => 50
]
]
Features
- Adds parameter type information to function calls
- Uses short class names for better readability
- Preserves XHProf recursion markers
- Maintains all original metrics
- Handles special types (self, static, parent)
Requirements
- PHP 8.1 or higher
- Reflection extension enabled