<?php
require('config.php');
$pgv_lang["sec"] = "Seconds";
$pgv_lang["exec_time"] = "Execution time";
$pgv_lang["total_queries"] = "Total queries";
$pgv_lang["total_privacy_checks"] = "Total privacy";
$pgv_lang["total_memory_usage"] = "Total memory";
print_execution_stats();

function printRelativeMemory() {
print "<table border=\"1\"><tr><th>Var</th><th>Memory</th></tr>";
$total = 0;
foreach($GLOBALS as $key=>$value) {
	if ($key!="GLOBALS") {
		print "<tr><td>".$key."</td><td>";
		$mem = strlen(serialize($value));
		print $mem;
		$total+=$mem;
		print "</td></tr>";
	}
}
print "<tr><td>Total</td><td>".$total."</td></tr>";
print "</table>";

}

printRelativeMemory();
?>