Swappability bug due to a typo fixed thanks to code review by Felix Geisendörfer @felixge

This commit is contained in:
antirez 2010-03-01 22:15:49 +01:00
parent be0af2f0ec
commit c8c72447f6
2 changed files with 2 additions and 3 deletions

View File

@ -7560,7 +7560,7 @@ static double computeObjectSwappability(robj *o) {
}
break;
}
return (double)asize*log(1+asize);
return (double)age*log(1+asize);
}
/* Try to swap an object that's a good candidate for swapping.

View File

@ -952,7 +952,6 @@ proc main {server port} {
$r sort tosort {DESC}
} [lsort -decreasing -integer $res]
while 1 {
test {SORT speed, sorting 10000 elements list using BY, 100 times} {
set start [clock clicks -milliseconds]
for {set i 0} {$i < 100} {incr i} {
@ -963,7 +962,7 @@ while 1 {
flush stdout
format {}
} {}
}
test {SORT speed, sorting 10000 elements list directly, 100 times} {
set start [clock clicks -milliseconds]
for {set i 0} {$i < 100} {incr i} {