summaryrefslogtreecommitdiff
path: root/utils/lru
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2016-07-11 16:26:02 +0200
committerantirez <antirez@gmail.com>2016-07-11 16:26:02 +0200
commitb19b2dff46f013b256f6966d3ace0d1cebcc10be (patch)
treefce86aa2ce0212bb38b80664d5f45d9866cd8855 /utils/lru
parent6a1c00c9ea8d646acdc66d64633e1a3904509c41 (diff)
downloadredis-b19b2dff46f013b256f6966d3ace0d1cebcc10be.tar.gz
LRU: Fix output fixes to new test-lru.rb.
Diffstat (limited to 'utils/lru')
-rw-r--r--utils/lru/test-lru.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/lru/test-lru.rb b/utils/lru/test-lru.rb
index dadc6d505..1a6baf467 100644
--- a/utils/lru/test-lru.rb
+++ b/utils/lru/test-lru.rb
@@ -7,7 +7,7 @@ def testit(filename)
r = Redis.new
r.config("SET","maxmemory","2000000")
r.config("SET","maxmemory-policy","allkeys-lru")
- r.config("SET","maxmemory-samples",10)
+ r.config("SET","maxmemory-samples",5)
r.config("RESETSTAT")
r.flushall
@@ -55,7 +55,7 @@ EOF
inserted = r.dbsize
first_set_max_id = id
- html << "#{r.dbsize} keys inserted"
+ html << "#{r.dbsize} keys inserted.\n"
# Access keys sequentially, so that in theory the first part will be expired
# and the latter part will not, according to perfect LRU.
@@ -74,7 +74,7 @@ EOF
# Note that we insert the first 100 keys of the new set into DB1 instead
# of DB0, so that we can try how cross-DB eviction works.
half = inserted/2
- html << "Insert enough keys to evict half the keys we inserted"
+ html << "Insert enough keys to evict half the keys we inserted.\n"
add = 0
otherdb_start_idx = id+1
@@ -92,8 +92,8 @@ EOF
break if r.info['evicted_keys'].to_i >= half
end
- html << "#{add} additional keys added."
- html << "#{r.dbsize} keys in DB"
+ html << "#{add} additional keys added.\n"
+ html << "#{r.dbsize} keys in DB.\n"
# Check if evicted keys respect LRU
# We consider errors from 1 to N progressively more serious as they violate
@@ -126,7 +126,7 @@ EOF
STDERR.puts "Test finished with #{errors}% error! Generating HTML on stdout."
- html << "#{errors}% error!"
+ html << "#{errors}% error!\n"
html << "</pre>"
$runs << errors