Changeset 539
- Timestamp:
- 05/04/07 02:30:06 (2 years ago)
- Files:
-
- trunk/api/xs/memtest.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/api/xs/memtest.pl
r533 r539 58 58 } 59 59 60 my $gets = 1000; #100060 my $gets = 1000; 61 61 my $max_key = 1000; 62 my $data_min = 2000; 63 my $data_max = 12_000; 64 62 65 die unless GetOptions( 63 'gets ' => \$gets,66 'gets=i' => \$gets, 64 67 'maxkey=i' => \$max_key, 68 'data_min=i' => \$data_min, 69 'data_max=i' => \$data_max, 65 70 ); 66 71 … … 71 76 72 77 my %correct; 73 srand (1); 78 my $data_delta = $data_max - $data_min; 79 74 80 for my $k (1..$max_key) { 75 my $val = join('', map { chr(64 + int rand (60)) } (1..( 2000 + int rand 10_000)));81 my $val = join('', map { chr(64 + int rand (60)) } (1..($data_min + int rand $data_delta))); 76 82 $correct{$k} = $val; 77 83 my $rv = $memd->set($k, $val) … … 114 120 warn "$bad bad results\n"; 115 121 116 warn "elapsed times: $elapsed wallclock, $cpu_user user, $cpu_sys system\n" 122 warn "elapsed times: $elapsed wallclock, $cpu_user user, $cpu_sys system\n"; 123 124 print "$data_min, $data_max, $elapsed, $cpu_user, $cpu_sys\n";
