Merge pull request #182 from Orange-OpenSource/feature/add-benchsuite

Create Bench suite
This commit is contained in:
Fabrice Reix 2021-03-20 15:13:09 +01:00 committed by GitHub
commit 4f1405192c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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