Request stats
oitsuki opened this issue · 1 comments
oitsuki commented
Is is possible to make something allowing to know the stats in php file ?
Currently is inside a comment, But it's to display another file inside the website for example.
I think across a proeload_stat.json for example in the same preloader.php directory.
Tk.
<?php
/**
* - Used Memory: 17.8 MB
* - Free Memory: 110.1 MB
* - Wasted Memory: 0.1 MB
* - Cached files: 819
* - Hit rate: 9837.7706289842%
* - Misses: 822
* Preloader config
* - Memory limit: 32 MB
-
- Overwrite: true
-
- Files excluded: 0
-
- Files appended: 5455
*/
DarkGhostHunter commented
All Opcache stats are available using opcache_get_status(false)
. You can encode the output to JSON automatically and write it to a file wherever you want.
I personally don't consider the Preload stats a necessity, but I'll accept a good PR that prints the same information on the preloader into a JSON file, as opt-int.