Sha256: eff914e2f28e6a7a68f1e1e7006cd46b54d6642fac7c3d7f7303dbe84f90e224
Contents?: true
Size: 522 Bytes
Versions: 2
Compression:
Stored size: 522 Bytes
Contents
require 'net/http' # uri = URI("http://192.168.62.128:8888/riak.test") def run(n, uri) (0..n).each do |i| json = "{\"hoge\":\"valueoooooooo ???? special? \",\"id\":#{i}}" res = Net::HTTP.post_form(uri, 'json' => json) if (i % 1000) == 0 then print "#{i}: #{res.code}\n" end end end uri = URI("http://192.168.100.128:8888/riak.test") n = 1024*1024 start = Time.now run(n, uri) duration = (Time.now - start).to_i mps = n * 1.0 / duration print "#{n} messages in #{duration} secs: #{mps} mps.\n"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-riak-0.0.2 | loader.rb |
fluent-plugin-riak-0.0.1 | loader.rb |