[php-src] PR #11523: Expose time spent collecting cycles in gc_status()
| From: | arnaud-lb | Date: | Sat, 24 Jun 2023 15:05:55 +0000 |
| Subject: | [php-src] PR #11523: Expose time spent collecting cycles in gc_status() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-22805@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/11523
Author: arnaud-lb
See #11327
This adds the following new entries to the
gc_status() result:
* application_time: Total application time (including collector_time)
* collector_time: Time spend collecting cycles (including destructor_time and free_time)
* destructor_time: Time spend executing destructors during cycle collection
* free_time: Time spend freeing values during cycle collection
Times have nanoseconds resolution and use a monotonic clock. They are exposed as a number of seconds
in floats, because the int type may be too small for nanoseconds depending on the platform.
application_time could be computed with hrtime(true) -
$_SERVER['REQUEST_TIME_FLOAT'], it seems useful to still expose it because
$_SERVER['REQUEST_TIME_FLOAT'] is not monotonic.