mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-09 13:26:48 +00:00
Add Nginx benchmark CI
This commit is contained in:
parent
88939f2a4c
commit
f8bd71a1e7
2
.github/workflows/benchmark_asterinas.yml
vendored
2
.github/workflows/benchmark_asterinas.yml
vendored
@ -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
|
||||||
|
9
test/benchmark/nginx/http_req10k_conc20_bw/config.json
Normal file
9
test/benchmark/nginx/http_req10k_conc20_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 20 http://localhost:8080/index.html",
|
||||||
|
"title": "Nginx HTTP request performance with 20 concurrency and 10000 requests in total",
|
||||||
|
"benchmark_type": "host_guest"
|
||||||
|
}
|
19
test/benchmark/nginx/http_req10k_conc20_bw/host.sh
Executable file
19
test/benchmark/nginx/http_req10k_conc20_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 20 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_conc20_bw/run.sh
Normal file
10
test/benchmark/nginx/http_req10k_conc20_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
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"benchmarks": [
|
"benchmarks": [
|
||||||
"http_req10k_conc1_bw"
|
"http_req10k_conc1_bw",
|
||||||
|
"http_req10k_conc20_bw"
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user