php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #66472
Patch extra-opcache_get_status-reporting.patch revision 2014-01-12 15:44 UTC by Terry at ellisons dot org dot uk

Patch extra-opcache_get_status-reporting.patch for opcache Bug #66472

Patch version 2014-01-12 15:44 UTC

Return to Bug #66472 | Download this patch
Patch Revisions:

Developer: Terry@ellisons.org.uk

--- a/zend_accelerator_module.c
+++ b/zend_accelerator_module.c
@@ -589,6 +589,11 @@ static ZEND_FUNCTION(opcache_get_status)
 	add_assoc_double(statistics, "blacklist_miss_ratio", reqs?(((double) ZCSG(blacklist_misses))/reqs)*100.0:0);
 	add_assoc_double(statistics, "opcache_hit_rate", reqs?(((double) ZCSG(hits))/reqs)*100.0:0);
 	add_assoc_zval(return_value, "opcache_statistics", statistics);
+	add_assoc_long(statistics, "num_cached_include_paths", ZCSG(include_paths).num_entries);
+	add_assoc_long(statistics, "max_cached_include_paths", ZCSG(include_paths).max_num_entries);
+	add_assoc_long(statistics, "top_interned_strings", ZCSG(interned_strings_top) - ZCSG(interned_strings_start));
+	add_assoc_long(statistics, "max_interned_strings", ZCSG(interned_strings_end) - ZCSG(interned_strings_start));
+	add_assoc_double(statistics, "interned_strings_entry_slot_percentage", ((double) ZCSG(interned_strings).nNumOfElements)*100.0/((double) ZCSG(interned_strings).nTableSize));
 
 	if (fetch_scripts) {
 		/* accelerated scripts */
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Feb 25 19:01:28 2020 UTC