Skip to content

A platform for rapid and reproducible performance experiments

License

Notifications You must be signed in to change notification settings

RetailMeNotSandbox/groundhar-day

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GroundHAR Day

GroundHAR Day is a tool for doing rapid, reproducible performance experiments.

Given an HTTP Archive - or HAR - GroundHAR Day simulates the observed network environment inside a VirtualBox VM. This makes it possible to replay the captured page load under different network conditions. More interestingly, the HAR content can be edited directly to quickly and rigorously evaluate different optimization ideas.

Quick start

Prerequisites

  1. Provision the VM
vagrant up
  1. Start the GroundHAR Day server
vagrant ssh
# then, from the Vagrant ssh session:
cd /opt/groundhar-day/src
sudo su
../bin/groundhar-day
  1. Upload a HAR to replay
curl -H "Content-Type: application/json" --data-binary @./examples/lawnsea.com.har -X PUT http://localhost:9000/har
  1. Open http://localhost:9222 in your browser and click on "about:blank"
  2. Type http://lawnsea.com into the headless browser's URL bar
  3. Reset the simulation for another replay
curl http://localhost:9000/reset

Documentation

VM

The VirtualBox VM is configured via environment variables in the shell where vagrant up is run.

GROUNDHAR_CPUS

The number of virtual CPUs the VM should have. Defaults to 4.

GROUNDHAR_DEVTOOLS_PORT

The port on the host where the Chrome DevTools is exposed. Defaults to 9222.

GROUNDHAR_MEMORY

The amount of memory in megabytes to reserve for the VM. Defaults to 2048.

GROUNDHAR_NETWORK_IP

The IP address of the VM on the groundhar-day VirtualBox internal network. Defaults to 192.168.42.1.

GROUNDHAR_SERVER_PORT

The port on the host where the GroundHAR Day server is exposed. Defaults to 9000.

About

A platform for rapid and reproducible performance experiments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published