Created
October 22, 2010 16:42
-
-
Save sgonyea/640924 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sgonyea@skgMac:~/Sites/workspace/pabst/ext$ ruby tst.rb | |
requiring... './Riakpb' | |
true | |
initializing Riakpb::Pabst... | |
a = Riakpb::Pabst.new | |
=> #<Riakpb::Pabst:0x00000100849b20> | |
client_id = a.get_client_id | |
=> -867536639 | |
server_info = a.server_info | |
=> {"node"=>"riak@127.0.0.1", "version"=>"0.13.0"} | |
keys = a.list_keys "tstBucket" | |
=> ["tstKey", "tstKey4", "tstKey2", "tstKey3"] | |
key = a.get_key "tstBucket", "tstKey" | |
=> {:vclock=>"k\xC3\x8Ea```\xC3\x8A`\xC3\x8A\x05R,\f\xC5\x93\xC3\xB3\xC3\x8Fe0%2\xC3\xA6\xC2\xB12$\v\xC3\xA8\x1C\xC3\xA3\xC2\x83\b\xC2\xB35'\xC2\xB1\xC3\x89N=\x05\xC2\x95\xC3\x88\aId\x01\x00", :contents=>[{:last_mod_usecs=>803723, :content_type=>"application/json", :value=>"\"Hello\"", :vtag=>"4VgZnIn3hyONE5aytTLIkr", :last_mod=>1287099503}]} | |
a.put_key "tstBucket5", "tstKey4", {:value => "fwoozy twoozy!", :content_type => "crap"}, nil, 1, 1, true | |
=> {:content=>[{"last_mod_usecs"=>890484, "content_type"=>"crap", "value"=>"fwoozy twoozy!", "vtag"=>"537sQKXpmyLkAkNr06uhse", "last_mod"=>1287765594}], :vclock=>"k\xC3\x8Ea``\xC3\xA0\xC3\x8E`\xC3\x8A\x05R,\xC2\x8C\x13l\xC3\xBC3\xC2\x98\x12\x19\xC3\xB3X\x19$,\xC3\x8C\xC2\x8E\xC3\xB1A\xC2\x84\xC3\x99\xC2\x9A\xC2\x93\xC2\x98\xC2\x8F\x1E`\xC2\x82J(\"$X\xC2\x98\xC3\x8E\xC2\xAC\xC3\x9E\xC2\x8E)\fT\xC3\x8Ff\xC3\xA2\xC3\xBE\b*!g\xC2\x85P\xC3\x8F\xC3\x96\xC3\xB8\xC3\xBC\x01\xC5\xA00P=\xC3\xAB\xC3\x8A\xC2\xB9\xC2\x87\xC2\xA0\x12\xC2\xAAH\xC3\xAA\xC3\x99%\xC2\xAF\xC2\x96b\x11f\b\xC3\xB2^\x0F\x15\xC2\xB6E1\xC2\x86}G\xC2\xB0=T\xC3\x82\x0EI=c\xC2\xA1\xC3\x97\x19\xC5\xA1p\x14\xC2\x8Az\xC3\xA6LyEd\xC2\x89,\x00", :successful=>"YES"} | |
buckets = a.list_buckets | |
=> ["tstBucket3", "tstBucket", "tstBucket2", "tstBucket5"] | |
## 1 | |
Rehearsal ------------------------------------------------ | |
client_id 0.000000 0.000000 0.000000 ( 0.023047) | |
server_info 0.000000 0.000000 0.000000 ( 0.005245) | |
list_keys 0.000000 0.000000 0.000000 ( 0.054568) | |
get_key 0.000000 0.000000 0.000000 ( 0.001168) | |
put_key 0.000000 0.000000 0.000000 ( 0.002234) | |
list_buckets 0.000000 0.000000 0.000000 ( 0.094323) | |
--------------------------------------- total: 0.000000sec | |
user system total real | |
client_id 0.000000 0.000000 0.000000 ( 0.001365) | |
server_info 0.000000 0.000000 0.000000 ( 0.001421) | |
list_keys 0.000000 0.000000 0.000000 ( 0.092763) | |
get_key 0.000000 0.000000 0.000000 ( 0.010878) | |
put_key 0.000000 0.000000 0.000000 ( 0.001677) | |
list_buckets 0.000000 0.000000 0.000000 ( 0.042561) | |
## 2 | |
Rehearsal ------------------------------------------------ | |
client_id 0.000000 0.000000 0.000000 ( 0.002132) | |
server_info 0.000000 0.000000 0.000000 ( 0.000951) | |
list_keys 0.000000 0.000000 0.000000 ( 0.060904) | |
get_key 0.000000 0.000000 0.000000 ( 0.066850) | |
put_key 0.000000 0.000000 0.000000 ( 0.010416) | |
list_buckets 0.000000 0.000000 0.000000 ( 0.048142) | |
--------------------------------------- total: 0.000000sec | |
user system total real | |
client_id 0.000000 0.000000 0.000000 ( 0.006739) | |
server_info 0.000000 0.000000 0.000000 ( 0.018793) | |
list_keys 0.000000 0.000000 0.000000 ( 0.071549) | |
get_key 0.000000 0.000000 0.000000 ( 0.018968) | |
put_key 0.000000 0.000000 0.000000 ( 0.020037) | |
list_buckets 0.000000 0.000000 0.000000 ( 0.061750) | |
## 3 | |
Rehearsal ------------------------------------------------ | |
client_id 0.000000 0.000000 0.000000 ( 0.011860) | |
server_info 0.000000 0.000000 0.000000 ( 0.011669) | |
list_keys 0.000000 0.000000 0.000000 ( 0.067524) | |
get_key 0.000000 0.000000 0.000000 ( 0.016457) | |
put_key 0.000000 0.000000 0.000000 ( 0.015698) | |
list_buckets 0.000000 0.000000 0.000000 ( 0.060338) | |
--------------------------------------- total: 0.000000sec | |
user system total real | |
client_id 0.000000 0.000000 0.000000 ( 0.001141) | |
server_info 0.000000 0.000000 0.000000 ( 0.000650) | |
list_keys 0.000000 0.000000 0.000000 ( 0.101894) | |
get_key 0.000000 0.000000 0.000000 ( 0.017162) | |
put_key 0.010000 0.000000 0.010000 ( 0.019593) | |
list_buckets 0.000000 0.000000 0.000000 ( 0.048950) | |
sgonyea@skgMac:~/Sites/workspace/pabst/ext$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rehearsal ----------------------------------------------------- | |
100 client_id 0.000000 0.000000 0.000000 ( 0.049426) | |
100 server_info 0.000000 0.010000 0.010000 ( 0.018878) | |
100 get_key 0.010000 0.000000 0.010000 ( 0.102779) | |
100 put_key 0.010000 0.010000 0.020000 ( 0.099167) | |
100 get_bucket 0.010000 0.000000 0.010000 ( 0.014196) | |
100 set_bucket 0.000000 0.000000 0.000000 ( 0.001577) | |
100 list_keys 0.030000 0.030000 0.060000 ( 6.972837) | |
100 list_buckets 0.020000 0.010000 0.030000 ( 7.190160) | |
-------------------------------------------- total: 0.140000sec | |
user system total real | |
100 client_id 0.000000 0.000000 0.000000 ( 0.016501) | |
100 server_info 0.010000 0.010000 0.020000 ( 0.012891) | |
100 get_key 0.000000 0.000000 0.000000 ( 0.059293) | |
100 put_key 0.010000 0.000000 0.010000 ( 0.081251) | |
100 get_bucket 0.010000 0.010000 0.020000 ( 0.013951) | |
100 set_bucket 0.000000 0.000000 0.000000 ( 0.001629) | |
100 list_keys 0.030000 0.020000 0.050000 ( 6.978675) | |
100 list_buckets 0.020000 0.020000 0.040000 ( 6.981888) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rehearsal ---------------------------------------------------- | |
100 client_id 0.000000 0.010000 0.010000 ( 0.012125) | |
100 server_info 0.000000 0.000000 0.000000 ( 0.018308) | |
100 get_key 0.010000 0.000000 0.010000 ( 0.059085) | |
100 get_bucket 0.010000 0.000000 0.010000 ( 0.015878) | |
100 put_key 0.000000 0.010000 0.010000 ( 0.096291) | |
100 set_bucket 0.000000 0.000000 0.000000 ( 0.001556) | |
------------------------------------------- total: 0.030000sec | |
user system total real | |
100 client_id 0.000000 0.010000 0.010000 ( 0.014390) | |
100 server_info 0.000000 0.000000 0.000000 ( 0.019914) | |
100 get_key 0.000000 0.000000 0.000000 ( 0.060208) | |
100 get_bucket 0.010000 0.010000 0.020000 ( 0.013833) | |
100 put_key 0.000000 0.000000 0.000000 ( 0.090448) | |
100 set_bucket 0.000000 0.000000 0.000000 ( 0.001569) | |
Rehearsal ---------------------------------------------------- | |
1000 client_id 0.020000 0.020000 0.040000 ( 0.112167) | |
1000 server_info 0.040000 0.020000 0.060000 ( 0.135838) | |
1000 get_key 0.070000 0.040000 0.110000 ( 0.550822) | |
1000 get_bucket 0.040000 0.030000 0.070000 ( 0.152231) | |
1000 set_bucket 0.010000 0.000000 0.010000 ( 0.018361) | |
------------------------------------------- total: 0.290000sec | |
user system total real | |
1000 client_id 0.030000 0.020000 0.050000 ( 0.110908) | |
1000 server_info 0.030000 0.030000 0.060000 ( 0.138240) | |
1000 get_key 0.070000 0.050000 0.120000 ( 0.491236) | |
1000 get_bucket 0.040000 0.030000 0.070000 ( 0.150769) | |
1000 set_bucket 0.020000 0.000000 0.020000 ( 0.018279) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment