private static function getMemoryUsage() {

        $memory = memory_get_peak_usage();
        $floor = floor((strlen($memory) - 1) / 3);
        return sprintf("%.2f", $memory/pow(1024, $floor)).' '.@'BKMGTPEZY'[$floor].'B';
    }