Socket
Book a DemoInstallSign in
Socket

rereplay

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rereplay

0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

ReReplay

ReReplay is for replaying production traffic (or any scripted traffic pattern, for that matter). You simply input a list of URLs that you want ReReplay to hit, and their associated times to make the request, and run it.

There are a couple other main features as well. You can provide Request Monitors to ReReplay -- these are executed before and/or after every request. There are also Periodic Monitors, which execute on regular intervals (for monitoring memory usage, or something). Lastly, you can provide a rampup strategy as well. For example, you could start out making requests at the "regular" rate, and by the end of the run be making requests at double the rate presribed in the original input.

Examples

(It's assumed you've already require'd "rereplay")

Simple

input = [
	[0, 	:get, "http://www.google.com/"],
	[0.5, :get, "http://www.microsoft.com/"],
	[0.9, :get, "http://www.amazon.com/"]
]
r = ReReplay::Runner.new(input)
r.run
# and done!    

Of course, this doesn't actually track any output, so...let's monitor the request time using the request_time_monitor:

Request Monitor

require "rereplay/monitors"
input = [same as in Simple]
mon = ReReplay::RequestTimeMonitor.new
r = ReReplay::Runner.new(input)
r.request_monitors << mon
r.run
puts mon.results.inspect

This will print out the results from the RequestTimeMonitor instance, which includes the url, the duration of the request, and its scheduled start time.

Specs

Specs have more examples and probably more up-to-date, too. They're fairly simple -- start with basic.rb.

License

Licensed under the permissive MIT license, provided in the LICENSE file.

FAQs

Package last updated on 30 Oct 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.