zoe             Mon Jun 22 07:56:40 2009 UTC

  Added files:                 
    /phpruntests/src    memorytestSPLFilterIterator.php memorytestSPL.php 
                        memorytestScanDir.php 
  Log:
  memory checking tests - to be removed later
  

http://cvs.php.net/viewvc.cgi/phpruntests/src/memorytestSPLFilterIterator.php?view=markup&rev=1.1
Index: phpruntests/src/memorytestSPLFilterIterator.php
+++ phpruntests/src/memorytestSPLFilterIterator.php
<?php

include 'rtUtil.php';
include 'rtPhptFilterIterator.php';

$topDir = $argv[1];


$s1 = getMicroTime();

$phptDirectoryList= rtUtil::getDirectoryListOld($topDir);

$s2 =  getMicroTime();
$t0 = $s2 - $s1;
echo "Time to create using SPL = " . $t0 . "\n";

echo "Memory : " . memory_get_usage() . " bytes \n";

var_dump(count($phptDirectoryList));


function getMicrotime(){
        list($useg,$seg)=explode(' ',microtime());
        return ((float)$useg+(float)$seg);
}

?>

http://cvs.php.net/viewvc.cgi/phpruntests/src/memorytestSPL.php?view=markup&rev=1.1
Index: phpruntests/src/memorytestSPL.php
+++ phpruntests/src/memorytestSPL.php
<?php

include 'rtUtil.php';

$topDir = $argv[1];


$s1 = getMicroTime();

$phptDirectoryList= rtUtil::getDirectoryList($topDir);

$s2 =  getMicroTime();
$t0 = $s2 - $s1;
echo "Time to create using SPL = " . $t0 . "\n";

echo "Memory : " . memory_get_usage() . " bytes \n";

var_dump(count($phptDirectoryList));


function getMicrotime(){
        list($useg,$seg)=explode(' ',microtime());
        return ((float)$useg+(float)$seg);
}

?>

http://cvs.php.net/viewvc.cgi/phpruntests/src/memorytestScanDir.php?view=markup&rev=1.1
Index: phpruntests/src/memorytestScanDir.php
+++ phpruntests/src/memorytestScanDir.php
<?php

include 'rtUtil.php';

$topDir = $argv[1];


$s3 = getMicroTime();
$phptDirectoryList2= rtUtil::parseDir($topDir);
$s4 = getMicroTime();
$t1 = $s4 - $s3;

echo "Time to create using scandir = " . $t1 . "\n";
echo "Memory : " . memory_get_usage() . " bytes \n";

var_dump(count($phptDirectoryList2));


function getMicrotime(){
        list($useg,$seg)=explode(' ',microtime());
        return ((float)$useg+(float)$seg);
}

?>



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to