mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-08 21:06:48 +00:00
Add Nginx benchmark CI
This commit is contained in:
parent
0620ec58e4
commit
61f6c637d2
1
.github/workflows/benchmark_asterinas.yml
vendored
1
.github/workflows/benchmark_asterinas.yml
vendored
@ -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:
|
||||
|
9
test/benchmark/nginx/http_req10k_conc1_bw/config.json
Normal file
9
test/benchmark/nginx/http_req10k_conc1_bw/config.json
Normal 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"
|
||||
}
|
19
test/benchmark/nginx/http_req10k_conc1_bw/host.sh
Executable file
19
test/benchmark/nginx/http_req10k_conc1_bw/host.sh
Executable 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
|
@ -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"
|
||||
}
|
||||
]
|
10
test/benchmark/nginx/http_req10k_conc1_bw/run.sh
Normal file
10
test/benchmark/nginx/http_req10k_conc1_bw/run.sh
Normal 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
|
19
test/benchmark/nginx/nginx.conf
Normal file
19
test/benchmark/nginx/nginx.conf
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
5
test/benchmark/nginx/summary.json
Normal file
5
test/benchmark/nginx/summary.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"benchmarks": [
|
||||
"http_req10k_conc1_bw"
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user