BASE . LOG,
'log_file_id' => $LOG_FILE_ID,
'log_per_date' => true,
]);
$PAGE_NAME = 'TEST CLASS: CRC64';
print "";
print "
" . $PAGE_NAME . "";
print "";
print '';
print '' . $PAGE_NAME . '
';
$file = getcwd() . DIRECTORY_SEPARATOR . 'class_test.file.php';
print "CRC64: $file: " . Crc64::crc64($file) . "
";
print "CRC64HEX: $file: " . Crc64::crc64hex($file) . "
";
print "
";
// big file check including speed
$base_path = __DIR__ . DIRECTORY_SEPARATOR
. '..' . DIRECTORY_SEPARATOR
. '..' . DIRECTORY_SEPARATOR
. '4dev' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR .
'Create' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR;
$max_size = 1024 * 1024 * 10;
# open the base path and loop over each file in there
$files = glob($base_path . '*');
if (!empty($files)) {
foreach ($files as $file) {
if (!is_file($file)) {
continue;
}
if (filesize($file) > $max_size) {
print "Skipping large file: $file
";
continue;
}
RunningTime::hrRunningTime();
print "CRC64: $file: " . Crc64::crc64($file) . "
";
print "Running Time: $file: " . RunningTime::hrRunningTime() . "
";
print "
";
print "CRC64HEX: $file: " . Crc64::crc64hex($file) . "
";
print "Running Time: $file: " . RunningTime::hrRunningTime() . "
";
RunningTime::hrRunningTimeReset();
print "
";
}
} else {
print "No files found in base path: $base_path
";
}
print "";
// __END__