Add Nginx benchmark CI

This commit is contained in:
Yuke Peng 2024-09-28 19:07:31 +08:00 committed by Tate, Hongliang Tian
parent 0620ec58e4
commit 61f6c637d2
7 changed files with 77 additions and 0 deletions

View File

@ -63,6 +63,7 @@ jobs:
- lmbench/tcp_loopback_http_bw
- lmbench/udp_loopback_lat
- iperf3/tcp_virtio_bw
- nginx/http_req10k_conc1_bw
fail-fast: false
timeout-minutes: 60
container:

View File

@ -0,0 +1,9 @@
{
"alert_threshold": "125%",
"alert_tool": "customBiggerIsBetter",
"search_pattern": "Transfer rate:",
"result_index": "3",
"description": "ab -n 10000 -c 1 http://localhost:8080/index.html",
"title": "Nginx HTTP request performance with 1 concurrency and 10000 requests in total",
"benchmark_type": "host_guest"
}

View File

@ -0,0 +1,19 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
set -e
# Function to stop the guest VM
stop_guest() {
echo "Stopping guest VM..."
pgrep qemu | xargs kill
}
# Trap EXIT signal to ensure guest VM is stopped on script exit
trap stop_guest EXIT
# Run apache bench
ab -n 10000 -c 1 http://localhost:8080/index.html
# The trap will automatically stop the guest VM when the script exits

View File

@ -0,0 +1,14 @@
[
{
"name": "Average HTTP Bandwidth over virtio-net between Host Linux and Guest Linux",
"unit": "Kbytes/sec",
"value": 0,
"extra": "linux_result"
},
{
"name": "Average HTTP Bandwidth over virtio-net between Host Linux and Guest Asterinas",
"unit": "Kbytes/sec",
"value": 0,
"extra": "aster_result"
}
]

View File

@ -0,0 +1,10 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
set -e
cp /benchmark/nginx/nginx.conf /usr/local/nginx/conf/
echo "Running nginx server"
/usr/local/nginx/sbin/nginx

View File

@ -0,0 +1,19 @@
user root;
daemon off;
worker_processes 1;
events {
}
http {
include mime.types;
server {
listen 10.0.2.15:8080;
access_log off;
location / {
autoindex on;
}
}
}

View File

@ -0,0 +1,5 @@
{
"benchmarks": [
"http_req10k_conc1_bw"
]
}