Add Nginx benchmark CI

This commit is contained in:
Yuke Peng 2024-10-27 15:35:24 +08:00 committed by Tate, Hongliang Tian
parent 88939f2a4c
commit f8bd71a1e7
6 changed files with 56 additions and 1 deletions

View File

@ -64,7 +64,9 @@ jobs:
- lmbench/tcp_loopback_http_bw - lmbench/tcp_loopback_http_bw
- lmbench/udp_loopback_lat - lmbench/udp_loopback_lat
- iperf3/tcp_virtio_bw - iperf3/tcp_virtio_bw
# Nginx benchmarks
- nginx/http_req10k_conc1_bw - nginx/http_req10k_conc1_bw
- nginx/http_req10k_conc20_bw
# Redis benchmarks # Redis benchmarks
- redis/ping_inline_100k_conc20_rps - redis/ping_inline_100k_conc20_rps
- redis/ping_mbulk_100k_conc20_rps - redis/ping_mbulk_100k_conc20_rps

View File

@ -0,0 +1,9 @@
{
"alert_threshold": "125%",
"alert_tool": "customBiggerIsBetter",
"search_pattern": "Transfer rate:",
"result_index": "3",
"description": "ab -n 10000 -c 20 http://localhost:8080/index.html",
"title": "Nginx HTTP request performance with 20 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 20 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

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