buggregator / trap

Buggregator local debug server for PHP projects as composer package
https://buggregator.dev
BSD 3-Clause "New" or "Revised" License
126 stars 9 forks source link

Add searching for XHProf local files #111

Closed roxblnfk closed 4 months ago

roxblnfk commented 4 months ago

What was changed

Added FileObserver that can find xhprof files in a directory configured in php.ini

Add envs:

Difference between algorithms:

`TRAP_XHPROF_SORT=0` ![image](https://github.com/buggregator/trap/assets/4152481/6254c7ae-7fdd-4368-a145-d14dee92fdd1) `TRAP_XHPROF_SORT=1` ![image](https://github.com/buggregator/trap/assets/4152481/741dffb8-1d6f-477d-8897-d58077a3c129) `TRAP_XHPROF_SORT=2` ![image](https://github.com/buggregator/trap/assets/4152481/3d44de5c-131b-44e9-8bb8-d5193b5f41ef) `TRAP_XHPROF_SORT=3` ![image](https://github.com/buggregator/trap/assets/4152481/217e454e-5b05-46f6-8c8e-8a3fd9d808b1)

Checklist

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 2.64706% with 331 lines in your changes are missing coverage. Please review.

Project coverage is 22.81%. Comparing base (3aedbe7) to head (fd1889c).

Files Patch % Lines
src/Service/FilesObserver/Converter/XHProf.php 0.00% 74 Missing :warning:
src/Service/FilesObserver/Converter/Tree.php 0.00% 45 Missing :warning:
src/Service/FilesObserver/Converter/Cost.php 0.00% 38 Missing :warning:
src/Service/FilesObserver/Handler.php 0.00% 33 Missing :warning:
src/Service/FilesObserver/FileInfo.php 0.00% 25 Missing :warning:
src/Service/FilesObserver.php 0.00% 23 Missing :warning:
src/Proto/Frame/Profiler/Payload.php 0.00% 20 Missing :warning:
src/Sender/Console/Renderer/Profiler.php 0.00% 12 Missing :warning:
src/Application.php 0.00% 10 Missing :warning:
src/Service/FilesObserver/Converter/Edge.php 0.00% 8 Missing :warning:
... and 13 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #111 +/- ## ============================================ - Coverage 24.81% 22.81% -2.01% - Complexity 1136 1232 +96 ============================================ Files 132 146 +14 Lines 3469 3791 +322 ============================================ + Hits 861 865 +4 - Misses 2608 2926 +318 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.