View Issue Details

IDProjectCategoryView StatusLast Update
0001506XdebugUncategorizedpublic2020-03-12 16:46
Reporterbeberlei Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.6.0beta1 
Target Version2.6.0Fixed in Version2.6.0rc1 
Summary0001506: Collect statistics about garbage collection
Description

The PHP garbage collection doesn't expose statistical information about number of runs, efficiency, memory cleared and exact locations of code where they are triggered.

I want to port the functionality of my garbage_stats extension (https://github.com/tideways/php_garbage_stats) into Xdebug to provide this functionality.

It works by setting an INI setting "xdebug.gc_stats_enable=1" or calling the function "xdebug_start_gcstats([$filename]);".

Output of this process is a file written to disk by using the xdebug.gc_stats_output_dir/name options for naming or the provided filename in the function.

Currently only a non machine readable, tabular format is provided with the following data points:

  • number of objects/hashtables cleared during the garbage collection run.
  • efficiency of the GC run, specifiying a percentage of all the checked objects that where actually cleared. shouljd be high, otherwise the gc run was a waste.
  • duration: how long took the garbage collection?
  • memory before/after and % in reduction
  • function that the garbage collection was triggered during.
TagsNo tags attached.
Operating System
PHP Version7.2.0-7.2.4

Activities

There are no notes attached to this issue.