Source

event_shipper / bin / producer

Full commit
#!/usr/bin/env ruby

# A trivial test script that produces a file called test.log and appends N 
# messages per second to the file. 

n = Integer(ARGV.first || 1)

sleep_seconds = (1 / Float(n))

File.open('test.log', 'a+') do |file|
  file.sync = true

  loop do
    file.puts "A message (#{Time.now})"
    sleep sleep_seconds
  end
end