This project contains files to evaluate and benchmark normal and modified cache version.
- Install google chrome
- Install requirements.txt
To clone a website use self_hosting package.
PYTHONPATH=$(pwd) python self_hosting/entrypoint.py https://target-domain.com/ -sp /path/to/storage/ -cfp /path/to/Caddyfile- target-domain: Website you want clone. e.g.:
https://fa.wikipedia.org/ - -sp: Your storage path. Website resources placed on it.
- Note: Use absolute path. Because It will use on caddyfile
- -cfp: Caddyfile that configure caddy to server website will place on this path
Clone modified version of caddy. You can compile golang code to run webserver.
go mod download
go build -o newcaddy ./cmd/caddy
./newcaddy run --config /path/to/Caddyfile/path/to/Caddyfile should copy from previous step
To get a benchmark from 2 version (classic and our version), You can use load_testing package.
This step require one more step before running. To invalidate browser cache, we should change system time to future.
This process should run as sudo. To set Your password,
in load_testing/time_faker.py change YOUR_PASSWORD with your own.
Then,
python load_testing/entrypoint.py -r 3 http://localhost/target/- target: Is your target cloned in previous step without domain.
- For example if your target is fa.wikipedia.org,
targetwill befa.wikipedia.
- For example if your target is fa.wikipedia.org,
- -r: Is number of repeats. In each network condition code loads site
-rtimes to get a median from response times.