I'm making a little benchmark class to display page load time and memory usage. Load time is already working, but when I display the memory usage, it doesn't change Example:
$conns = array();
ob_start();
benchmark::start();
$conns[] = mysql_connect('localhost', 'root', '');
benchmark::stop();
ob_flush();
aynı bellek kullanır
$conns = array();
ob_start();
benchmark::start();
for($i = 0; $i < 1000; $i++)
{
$conns[] = mysql_connect('localhost', 'root', '');
}
benchmark::stop();
ob_flush();
Ben bayt bellek kullanımı almak için memory_get_usage (true) kullanıyorum.