script/fill in repsheet_visualizer-0.1.6 vs script/fill in repsheet_visualizer-0.1.7

- old
+ new

@@ -4,23 +4,31 @@ r = Redis.new r.flushdb 255.times do |i| - r.set("1.1.1.#{i}:950001:count", rand(1000)) - r.lpush("1.1.1.#{i}:requests", "request") - r.sadd("1.1.1.#{i}:detected", "950001") + r.zincrby("1.1.1.#{i}:detected", rand(1000), "950001") + r.lpush("1.1.1.#{i}:requests", "123, Chrome, GET, foo, bar") + if i > 220 r.set("1.1.1.#{i}:repsheet:blacklist", "true") end + + r.expire("1.1.1.#{i}:requests", (24 * 60 * 60)) + r.expire("1.1.1.#{i}:detected", (24 * 60 * 60)) end 255.times do |i| - r.lpush("2.2.2.#{i}:requests", "request") + r.lpush("1.1.1.#{i}:requests", "123, Chrome, POST, foo, bar") end 20.times do |i| - r.sadd("1.1.1.1:detected", "9900#{i + 10}") - r.set("1.1.1.1:9900#{i + 10}:count", 1000) + r.zincrby("1.1.1.1:detected", 1000, "9900#{i + 10}") end +r.lpush("1.1.1.1:requests", "123, Chrome, PUT, foo, bar") +r.lpush("1.1.1.1:requests", "123, Chrome, DELETE, foo, bar") +r.lpush("1.1.1.1:requests", "123, Chrome, HEAD, foo, bar") +r.lpush("1.1.1.1:requests", "123, Chrome, TRACE, foo, bar") +r.lpush("1.1.1.1:requests", "123, Chrome, OPTIONS, foo, bar") +r.lpush("1.1.1.1:requests", "123, Chrome, CONNECT, foo, bar")