Skip to content

Commit

Permalink
feat: github action for benchmark sanity check (#133)
Browse files Browse the repository at this point in the history
* link config.md to index.md

Change-Id: I56bedfa5f781d655214857ea42542251759a28a1

* update (link _config.md to _index.md)

Change-Id: I40c329b1e066faebe765675733959239670d9a01

* update readme.md to add config.md link

Change-Id: I31e1ac09cb3dab7736ed4e2fb94c83261dfa1132

* merge from main (#131)

* fix: Doc refine - link _config.md to _index.md (#129)

* link config.md to index.md

Change-Id: I56bedfa5f781d655214857ea42542251759a28a1

* update (link _config.md to _index.md)

Change-Id: I40c329b1e066faebe765675733959239670d9a01

---------

Co-authored-by: xiaosong yang <[email protected]>

* fix: update readme.md to add config.md link (#130)

* link config.md to index.md

Change-Id: I56bedfa5f781d655214857ea42542251759a28a1

* update (link _config.md to _index.md)

Change-Id: I40c329b1e066faebe765675733959239670d9a01

* update readme.md to add config.md link

Change-Id: I31e1ac09cb3dab7736ed4e2fb94c83261dfa1132

---------

Co-authored-by: xiaosong yang <[email protected]>

---------

Co-authored-by: xiaosong yang <[email protected]>

* init github action for benchmark sanity check

Change-Id: Ica2cbab2681d196862e307c0b6e15945df2d0b9c

* renamed:    .github/workflows/sanity-test.yml -> .github/workflows/sanity-test.yaml

Change-Id: Id56743fa69e57a03dad2f825e3a2121effd02e4a

* Update sanity-test.yaml

* rename sanity-test.yaml to build.yaml to test the script

Change-Id: I5c5e1659b41a112200e3d60c84670fa71cbac541

* Update build.yaml

* Update to test build.yaml

* Update and test build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* benchmark sanity github action

Change-Id: Ie2500a0aff70240b6139905389c3c11aa945b4db

* only test http

Change-Id: Ia5253a34dc475ffc2fb8bb5245b02c0b48d17145

* debug https

Change-Id: I642258ce01f3739b011e6c592f3205f389d1ef33

* benchmark-sanity.yaml applies to master branch.

Change-Id: I17f28ef00bbdb1cfa7d55e8b418f401702f0c1cc

---------

Co-authored-by: xiaosong yang <[email protected]>
  • Loading branch information
xiaosongyang-sv and xiaosong yang authored Nov 1, 2024
1 parent f2b2d7b commit c32ffad
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 2 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/benchmark-sanity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
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: Setup-Certs
run: |
cd examples/ &&
./gen_cert.sh &&
cp certs/server.key certs/key.pem &&
cp certs/server.crt certs/cert.pem &&
cd ..
- 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.crt > ./combined.pem &&
sudo mv ./combined.pem /etc/nginx/ &&
sudo systemctl enable nginx &&
sudo systemctl start nginx &&
# curl -vvv http://localhost:10082/ &&
sleep 2
- name: Build-Proxy
run: |
sudo apt-get install -y pkg-config &&
cargo build --verbose &&
cd ..
- name: Cache
uses: Swatinem/rust-cache@v1
- 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 &&
cd .. &&
sleep 2
- name: Run-Proxy
run: 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: Run-Client-Proxy-Server
working-directory: wrk2
run: |
sleep 2
curl -vvv http://localhost:8402/ &&
curl -k https://localhost:6443/ &&
./wrk -d 1m -c 640 -t 64 -R 200000 --latency http://localhost:8402 &&
./wrk -d 1m -c 640 -t 64 -R 140000 --latency https://localhost:6443 &&
sleep 2
3 changes: 1 addition & 2 deletions docs/cloudwego/Getting Started/_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ weight: 2
keywords: ["Monolake", "Rust", "Proxy", "Configuration"]
description: "This page provides a brief guide for Monolake configuration"
---

## Configuration

This chapter provides a brief guide for Monolake configuration.
Expand All @@ -14,7 +13,7 @@ The configuration file is in .toml format. Basic configuration includes the foll

### Runtime

This section starts with [runtime]. It defines global run time configurations, including worker threads number and max connection entries. Optionally it may include a field "runtime_type" and it can be assigned to "legacy". Fox example:
This section starts with [runtime]. It defines global run time configurations, including worker threads number and max connection entries. Optionally it may include a field "runtime_type" and it can be assigned to "legacy" (this is default for non-linux OS). If the host OS is linux, it can be also assigned to "iouring" (this is default for linux OS). For example:

```markup
[runtime]
Expand Down

0 comments on commit c32ffad

Please sign in to comment.