Salvatore Sanfilippo antirez

View gist:10625511
1 2 3 4
127.0.0.1:6379> pfadd hll 1 2 3 4 5 6
(integer) 1
127.0.0.1:6379> pfdebug decode hll
"Z:495 v:2,1 Z:2084 v:1,1 Z:4946 v:1,1 Z:3445 v:1,1 Z:4397 v:4,1 Z:208 v:2,1 Z:803"
View gist:10018556
1 2 3 4 5 6 7 8 9 10
cardinality 1 uses 5 bytes (0.00244140625 bits per register})
cardinality 10 uses 31 bytes (0.01513671875 bits per register})
cardinality 100 uses 271 bytes (0.13232421875 bits per register})
cardinality 1000 uses 1906 bytes (0.9306640625 bits per register})
cardinality 2000 uses 3517 bytes (1.71728515625 bits per register})
cardinality 3000 uses 4918 bytes (2.4013671875 bits per register})
cardinality 4000 uses 6129 bytes (2.99267578125 bits per register})
cardinality 5000 uses 7206 bytes (3.5185546875 bits per register})
cardinality 6000 uses 8099 bytes (3.95458984375 bits per register})
cardinality 7000 uses 8868 bytes (4.330078125 bits per register})
View gist:9992506
1 2 3 4 5 6 7 8 9 10
127.0.0.1:6379> zrangebylex words [anter + LIMIT 0 10
1) "anterior"
2) "anteriorly"
3) "anteroom"
4) "anterooms"
5) "antes"
6) "anthem"
7) "anthemed"
8) "anthems"
9) "anther"
View test-lru.rb
1 2 3 4 5 6 7 8 9
require 'rubygems'
require 'redis'
 
r = Redis.new
r.config("SET","maxmemory","2000000")
r.config("SET","maxmemory-policy","allkeys-lru")
r.config("SET","maxmemory-samples",1000)
r.config("RESETSTAT")
r.flushall
View gist:9489416
1 2 3 4 5
redis-cli -c -p 7000 :3.0:
redis 192.168.1.10:7000> set foo bar
-> Redirected to slot [12182] located at 192.168.1.11:7001
OK
redis 192.168.1.11:7001>
View gist:9486205
1 2 3 4 5 6 7 8 9 10
./redis-trib.rb call 192.168.1.11:7000 info | grep memory_human
used_memory_human:11.42M
used_memory_human:9.78M
used_memory_human:9.12M
used_memory_human:12.43M
used_memory_human:11.45M
used_memory_human:11.42M
used_memory_human:12.44M
used_memory_human:10.99M
used_memory_human:12.43M
View gist:9267914
1 2 3 4 5 6 7 8 9
UNESCAPES = {
'a' => "\x07", 'b' => "\x08", 't' => "\x09",
'n' => "\x0a", 'v' => "\x0b", 'f' => "\x0c",
'r' => "\x0d", 'e' => "\x1b", "\\\\" => "\x5c",
"\"" => "\x22", "'" => "\x27"
}
 
puts UNESCAPES.keys.join
#exit
View gist:9191513
1 2 3 4 5 6 7 8 9 10
Starting sentinel #0 at port 20000
Starting sentinel #1 at port 20001
Starting sentinel #2 at port 20002
Starting sentinel #3 at port 20003
Starting sentinel #4 at port 20004
Starting redis #0 at port 30000
Starting redis #1 at port 30001
Starting redis #2 at port 30002
Starting redis #3 at port 30003
Starting redis #4 at port 30004
View vmlatency.c
1 2 3 4 5 6 7 8 9 10
/* vmlatency.c
*
* Measure max latency of a running process that does not result from
* syscalls. Basically this software should provide an hint about how much
* time the kernel leaves the process without a chance to run.
*
* Copyright (C) 2014 Salvatore Sanfilippo.
* This software is released under the BSD two-clause license.
*
* compile with: cc vmlatency.c -o vmlatency
View gist:8738422
1 2 3 4 5
$ lsof -p 96144
 
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
 
tclsh8.5 96144 antirez 10u IPv4 0xee68e5eeb7bbc4d3 0t0 TCP localhost:53651->localhost:21212 (SYN_SENT)
Something went wrong with that request. Please try again.