generated from cloudwego/.github
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init github action for benchmark sanity check
Change-Id: Ica2cbab2681d196862e307c0b6e15945df2d0b9c
- Loading branch information
xiaosong yang
committed
Oct 29, 2024
1 parent
f235b27
commit adceb06
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: benchmark sanity check | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '**.md' | ||
- '**.png' | ||
|
||
env: | ||
RUST_TOOLCHAIN: nightly | ||
TOOLCHAIN_PROFILE: minimal | ||
|
||
jobs: | ||
benchmark: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: ${{ env.TOOLCHAIN_PROFILE }} | ||
toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
override: true | ||
- name: Build Proxy | ||
run: | | ||
sudo apt-get install -y pkg-config | ||
cargo build --verbose | ||
- name: Cache | ||
uses: Swatinem/rust-cache@v1 | ||
- name: Run proxy | ||
run: | | ||
cd examples/ && | ||
./gen_cert.sh && | ||
cp certs/server.key certs/key.pem && | ||
cp certs/server.crt certs/cert.pem && | ||
sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && sudo -u runner RUSTUP_TOOLCHAIN=nightly RUST_LOG=NONE /home/runner/.cargo/bin/cargo run --package monolake -- -c benchmark/proxy/monolake/monolake.toml &" | ||
- name: Install Run Server | ||
run: | | ||
sudo apt-get update && | ||
sudo apt-get install -y openssl nginx && | ||
sudo cp ./benchmark/server/nginx-web.conf /etc/nginx/nginx.conf && | ||
sudo cp -r ./benchmark/server/webroot/* /usr/share/nginx/html/ && | ||
cat examples/certs/server.key examples/certs/server.pkcs8 > ./combined.pem && | ||
sudo mv ./combined.pem /etc/nginx/ && | ||
mv certs examples/ && | ||
sudo cp examples/certs/cert.pem /etc/nginx/ && | ||
sudo systemctl enable nginx && | ||
sudo systemctl start nginx && | ||
sleep 2 | ||
- name: Checkout client | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: 'giltene/wrk2' | ||
path: 'wrk2' | ||
- name: Build client | ||
run: | | ||
sudo apt-get -y install gcc make git libssl-dev zlib1g-dev && | ||
cd wrk2 && | ||
make WITH_OPENSSL=/usr && | ||
sleep 2 | ||
- name: Run client | ||
run: | | ||
cd wrk2 && | ||
curl -vvv http://localhost:8402 && | ||
./wrk -d 1m -c 640 -t 64 -R 200000 --latency http://localhost:8402 && | ||
sleep 2 |