performance-x / xhprof-data-processor
Enhances XHProf profiling data by adding detailed function signatures including parameter types
Package info
github.com/performance-x/xhprof-data-processor
pkg:composer/performance-x/xhprof-data-processor
v1.0.0
2025-01-22 22:26 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^9.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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