Commit c8c72447 authored by antirez's avatar antirez
Browse files

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

parent be0af2f0
...@@ -7560,7 +7560,7 @@ static double computeObjectSwappability(robj *o) { ...@@ -7560,7 +7560,7 @@ static double computeObjectSwappability(robj *o) {
} }
break; 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. /* Try to swap an object that's a good candidate for swapping.
......
...@@ -952,7 +952,6 @@ proc main {server port} { ...@@ -952,7 +952,6 @@ proc main {server port} {
$r sort tosort {DESC} $r sort tosort {DESC}
} [lsort -decreasing -integer $res] } [lsort -decreasing -integer $res]
while 1 {
test {SORT speed, sorting 10000 elements list using BY, 100 times} { test {SORT speed, sorting 10000 elements list using BY, 100 times} {
set start [clock clicks -milliseconds] set start [clock clicks -milliseconds]
for {set i 0} {$i < 100} {incr i} { for {set i 0} {$i < 100} {incr i} {
...@@ -963,7 +962,7 @@ while 1 { ...@@ -963,7 +962,7 @@ while 1 {
flush stdout flush stdout
format {} format {}
} {} } {}
}
test {SORT speed, sorting 10000 elements list directly, 100 times} { test {SORT speed, sorting 10000 elements list directly, 100 times} {
set start [clock clicks -milliseconds] set start [clock clicks -milliseconds]
for {set i 0} {$i < 100} {incr i} { for {set i 0} {$i < 100} {incr i} {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment