Sha256: 64aa5e7b2c1e362dcc222e0965635b1e2c1a372d69bfb21521716e986309a181

Contents?: true

Size: 633 Bytes

Versions: 27

Compression:

Stored size: 633 Bytes

Contents

#!/usr/bin/env ruby

require 'redis'
require 'json'

#id = "%.2d" % (1..10).to_a[rand(9)]

events = []

events << {
  'entity' => "client1-localhost-test-1",
  'check' => 'foo',
  'type' => 'service',
  'state' => 'unknown',
}.to_json

redis = Redis.new(:db => 13)

events.each {|event|
  redis.rpush 'events', event
}

puts "#{Time.now} - finished loading up events"
previous_events_size = redis.llen 'events'
while previous_events_size > 0
  sleep 1
  events_size = redis.llen 'events'
  throughput = previous_events_size - events_size
  previous_events_size = events_size
  puts "#{Time.now} - #{events_size} (#{throughput})"
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
flapjack-0.7.18 tmp/create_event_unknown.rb
flapjack-0.7.17 tmp/create_event_unknown.rb
flapjack-0.7.16 tmp/create_event_unknown.rb
flapjack-0.7.15 tmp/create_event_unknown.rb
flapjack-0.7.14 tmp/create_event_unknown.rb
flapjack-0.7.13 tmp/create_event_unknown.rb
flapjack-0.7.12 tmp/create_event_unknown.rb
flapjack-0.7.11 tmp/create_event_unknown.rb
flapjack-0.7.10 tmp/create_event_unknown.rb
flapjack-0.7.9 tmp/create_event_unknown.rb
flapjack-0.7.8 tmp/create_event_unknown.rb
flapjack-0.7.7 tmp/create_event_unknown.rb
flapjack-0.7.6 tmp/create_event_unknown.rb
flapjack-0.7.5 tmp/create_event_unknown.rb
flapjack-0.7.4 tmp/create_event_unknown.rb
flapjack-0.7.3 tmp/create_event_unknown.rb
flapjack-0.7.2 tmp/create_event_unknown.rb
flapjack-0.7.1 tmp/create_event_unknown.rb
flapjack-0.7.0 tmp/create_event_unknown.rb
flapjack-0.6.61 tmp/create_event_unknown.rb