[memcached] bradfitz, r406: fix paths
commits at code.sixapart.com
commits at code.sixapart.com
Thu Sep 14 17:29:03 UTC 2006
fix paths
U trunk/server/t/stress-memcached.pl
Modified: trunk/server/t/stress-memcached.pl
===================================================================
--- trunk/server/t/stress-memcached.pl 2006-09-13 19:33:22 UTC (rev 405)
+++ trunk/server/t/stress-memcached.pl 2006-09-14 17:29:02 UTC (rev 406)
@@ -2,8 +2,8 @@
#
use strict;
-use lib '../api/perl';
-use MemCachedClient;
+use lib '../../api/perl/lib';
+use Cache::Memcached;
use Time::HiRes qw(time);
unless (@ARGV == 2) {
@@ -13,7 +13,7 @@
my $host = shift;
my $threads = shift;
-my $memc = new MemCachedClient;
+my $memc = new Cache::Memcached;
$memc->set_servers([$host]);
unless ($memc->set("foo", "bar") &&
@@ -42,21 +42,21 @@
sub stress {
undef $memc;
- $memc = new MemCachedClient;
+ $memc = new Cache::Memcached;
$memc->set_servers([$host]);
my ($t1, $t2);
my $start = sub { $t1 = time(); };
- my $stop = sub {
+ my $stop = sub {
my $op = shift;
- $t2 = time();
+ $t2 = time();
my $td = sprintf("%0.3f", $t2 - $t1);
if ($td > 0.25) { print "Took $td seconds for: $op\n"; }
};
my $max = rand(50);
my $sets = 0;
-
+
for (my $i = 0; $i < $max; $i++) {
my $key = key($i);
my $set = $memc->set($key, $key);
@@ -94,7 +94,7 @@
}
sub key {
- my $n = shift;
+ my $n = shift;
$_ = sprintf("%04d", $n);
if ($n % 2) { $_ .= "a"x20; }
$_;
More information about the memcached-commits
mailing list