refactor: small project clean up
Diff
.gitignore | 4 +---
Makefile | 18 ++----------------
Makefile.toml | 12 ------------
benchmark/BENCHMARKS.md | 6 +++---
sample.env | 9 ---------
5 files changed, 6 insertions(+), 43 deletions(-)
@@ -8,8 +8,7 @@
**/.idea
**/*.txt
**/*.zip
**/*.tar.gz
**/*.tar
**/*.tar*
**/*.gz
**/.DS_Store
**/*.env
@@ -27,7 +26,6 @@ docs/site
docs/*/**.html
*/**/*.1
!sample.env
!/docs
!/tests/fixtures/**/*
!benchmark/sws_benchmarks*.csv
@@ -24,16 +24,6 @@ install:
@cargo install cargo-audit
.PHONY: install
run:
@rustc -vV
@cargo make --makefile Makefile.toml run
.PHONY: run
dev:
@rustc -vV
@cargo make --makefile Makefile.toml watch
.PHONY: dev
lint:
@rustc -vV
@cargo clippy --all-features -- -D warnings
@@ -277,17 +267,13 @@ docs-deploy:
@git checkout master
.PHONY: docs-deploy
promote:
@drone build promote joseluisq/static-web-server $(BUILD) $(ENV)
.PHONY: promote
loadtest:
vegeta:
@vegeta --version
@echo "GET http://localhost:8787" | \
vegeta -cpus=12 attack -workers=12 -connections=500 -rate=6500/s -duration=10s -http2=false > results.bin
@cat results.bin | vegeta report -type='hist[0,2ms,4ms,6ms]'
@cat results.bin | vegeta plot > plot.html
.PHONY: loadtest
.PHONY: vegeta
wrk:
@wrk -c 500 -t 12 -d 10s --latency -s benchmark/wrk_collector.lua $(WRK_URL)
@@ -1,12 +0,0 @@
env_files = [
{ path = "./development.env", profile = "development" },
{ path = "./production.env", profile = "production" }
]
[tasks.watch]
command = "cargo"
args = ["watch", "-cx", "run -- ${E_ARGS}"]
[tasks.run]
command = "cargo"
args = ["run", "--", "${E_ARGS}"]
@@ -2,11 +2,11 @@
> A benchmark suite which measures the requests per second and latency in average for several web servers.
<img title="SWS - Benchmarks 2022" src="data/sws_benchmarks.png" width="860">
<img title="SWS - Benchmarks 2022" src="sws_benchmarks.png" width="860">
## How to use
Change `WRK_URL` with the corresponding server URL to export the wrk metrics.
Change `WRK_URL` env with the corresponding server URL to export the wrk metrics.
```sh
WRK_URL="http://localhost" make wrk
@@ -21,4 +21,4 @@ WRK_URL="http://localhost" make wrk
## Data
For data used see [data](./data/) directory for more details.
For data used see [sws_benchmarks.csv](sws_benchmarks.csv) file.
@@ -1,9 +0,0 @@
E_ARGS = "--port=8787"
SERVER_LOG_LEVEL = "trace"
SERVER_ROOT = "docker/public"
SERVER_COMPRESSION = true
SERVER_DIRECTORY_LISTING = true