https://github.com/retailmenotsandbox/groundhar-day
A platform for rapid and reproducible performance experiments
https://github.com/retailmenotsandbox/groundhar-day
Last synced: 4 months ago
JSON representation
A platform for rapid and reproducible performance experiments
- Host: GitHub
- URL: https://github.com/retailmenotsandbox/groundhar-day
- Owner: RetailMeNotSandbox
- License: mit
- Created: 2017-02-07T18:31:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-06T17:32:44.000Z (almost 9 years ago)
- Last Synced: 2025-08-15T23:09:00.939Z (10 months ago)
- Language: JavaScript
- Size: 68.4 KB
- Stars: 30
- Watchers: 8
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
* [VirtualBox][]
* [Vagrant][]
1. Provision the VM
```sh
vagrant up
```
2. Start the GroundHAR Day server
```sh
vagrant ssh
# then, from the Vagrant ssh session:
cd /opt/groundhar-day/src
sudo su
../bin/groundhar-day
```
3. Upload a HAR to replay
```sh
curl -H "Content-Type: application/json" --data-binary @./examples/lawnsea.com.har -X PUT http://localhost:9000/har
```
4. Open [http://localhost:9222](http://localhost:9222) in your browser and click on "about:blank"
5. Type `http://lawnsea.com` into the headless browser's URL bar
6. Reset the simulation for another replay
```sh
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.
[HAR]: http://www.softwareishard.com/blog/har-12-spec/
[Vagrant]: https://www.vagrantup.com/downloads.html
[VirtualBox]: https://www.virtualbox.org/wiki/Downloads
[VirtualBox internal network]: https://www.virtualbox.org/manual/ch06.html#network_internal