Create Bench suite

This commit is contained in:
Fabrice Reix 2021-03-20 12:07:35 +01:00
parent 9be90c502d
commit 07a29fe4c5
5 changed files with 5069 additions and 0 deletions

View File

@ -124,3 +124,43 @@ jobs:
path: |
.\target\win-package\hurl-*-installer.exe
.\target\win-package\hurl-*-win64.zip
benchsuite:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Environment
run: |
uname -a
cargo --version
- name: Build
run: |
# Install libcurl dev so that hurl can be built dynamically with libcurl
sudo apt install libcurl4-openssl-dev
ci/release.sh
- name: Test Prequisites
run: |
pip3 install Flask
cd bench
python3 server.py >server.log 2>&1 &
sleep 2
netstat -an | grep 8000
- name: Run Bench Suite
run: |
export PATH="$PWD/target/release:$PATH"
cd bench
./run.sh
- name: Archive artifacts
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: tests-bench-artifacts
path: |
bench/server.log

9
bench/README Normal file
View File

@ -0,0 +1,9 @@
# Bench Suite
# Start Server
python server.py
# Run Bench Suite
./run.sh

7
bench/run.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
set -x
time hurl tests/hello_1000.hurl

12
bench/server.py Normal file
View File

@ -0,0 +1,12 @@
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/hello')
def hello():
return 'Hello World!'
app.run(host='0.0.0.0', port=8000)

5001
bench/tests/hello_1000.hurl Normal file

File diff suppressed because it is too large Load Diff