mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-04 13:08:05 +03:00
Create Bench suite
This commit is contained in:
parent
9be90c502d
commit
07a29fe4c5
40
.github/workflows/release.yml
vendored
40
.github/workflows/release.yml
vendored
@ -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
9
bench/README
Normal file
@ -0,0 +1,9 @@
|
||||
# Bench Suite
|
||||
|
||||
# Start Server
|
||||
python server.py
|
||||
|
||||
# Run Bench Suite
|
||||
./run.sh
|
||||
|
||||
|
7
bench/run.sh
Executable file
7
bench/run.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
time hurl tests/hello_1000.hurl
|
||||
|
||||
|
12
bench/server.py
Normal file
12
bench/server.py
Normal 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
5001
bench/tests/hello_1000.hurl
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user