#!/usr/bin/env ruby require 'time' def sample(arr) arr[rand arr.length] end begin loop do url = "/#{sample %w(users products photos)}/#{rand(1000)}" time = Time.now.iso8601 rtime = rand(1_000_000) status = sample [200, 302] puts [status, time, rtime, url].join("\t") $stdout.flush sleep rand(10).to_f / 100.0 end rescue Interrupt exit 0 end