profilingInstructions.txt
Profiling instructions
######################
Usage:
<?php
define("APP_DIR",dirname(__FILE__));
require_once "../load.php"; // Loads nette
$path = "E:\\Videa\\BigFile.avi";
$tools = BigFileTools::fromPath($path);
echo $tools->profileSize();
// Add this to BigFileTools class and change all size* methods to public
function profileSize() {
$this->absolutizePath();
$this->profileFn("sizeNativeSeek");
$this->profileFn("sizeNativeRead");
$this->profileFn("sizeCurl");
$this->profileFn("sizeExec");
$this->profileFn("sizeCom");
}
function profileFn($name, $params=array()) {
Debug::timer($name);
$return = call_user_func_array(array($this,$name), $params);
if($return) {
echo "Funkce ".$name." vrátila ".$return."\n";
} else {
echo 'Funkce '.$name." selhala."."\n";
}
echo "Funkce ".$name." trvala ".Debug::timer($name)."s."."\n";
}