| | |
Simple Benchmark script
![]() |
•
•
Join Date: Aug 2004
Posts: 140
Reputation:
Solved Threads: 2
Hello all,
I have been working with Linux a lot and i find myself installing a lot of linux distros, but with no way to test them.....
So i crafted a script in Perl to quickly create a lot of files on the Hard Disk and delete them. The script will count the number of milliseconds it took from start till deletion of all the files....
For example, on my home pc, with IDE Drives, it took ~800ms, on my laptop (SATA) ~200ms and on an old pentium 1.4ghz, fresh install - ~400ms
any comments are mostly welcomed!
I have been working with Linux a lot and i find myself installing a lot of linux distros, but with no way to test them.....
So i crafted a script in Perl to quickly create a lot of files on the Hard Disk and delete them. The script will count the number of milliseconds it took from start till deletion of all the files....
For example, on my home pc, with IDE Drives, it took ~800ms, on my laptop (SATA) ~200ms and on an old pentium 1.4ghz, fresh install - ~400ms
Perl Syntax (Toggle Plain Text)
use Time::HiRes qw[gettimeofday tv_interval]; use File::Path; if (-e "test") { system("rm -rf test"); } $timedata = [gettimeofday()]; mkdir "test" or die $!; chdir "test" or die $!; my $num = 1; while ($num != 6000) { $num = $num + 1; open FILE, ">", "$num.txt" or die $!; } system("rm -rf test"); my $duration = tv_interval($timedata) * 1000; print "$duration Milliseconds"; print "\n";
any comments are mostly welcomed!
Want a new website for free:
http://indigo.kjots.com/
http://indigo.kjots.com/
![]() |
Similar Threads
- simple php script fix (PHP)
- Simple Forum Script? (PHP)
- very simple login script (checking 2 variables before writing cookie) (PHP)
- Simple Shell Script Question.... [java related] (Shell Scripting)
- Simple article manager script in PHP I wrote (PHP)
- Really simple script request - Count from 6 - 0 (JavaScript / DHTML / AJAX)
- Simple script parser - how to ? (C++)
- A simple perl script (Perl)
- Log file rotation script (Perl)
- simple cgi script issue (Python)
Other Threads in the Perl Forum
- Previous Thread: Compare 2 tables
- Next Thread: Perl Newby Question
| Thread Tools | Search this Thread |





