benchmark.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. name: benchmark
  2. on:
  3. push:
  4. paths-ignore:
  5. - '**.md'
  6. pull_request:
  7. paths-ignore:
  8. - '**.md'
  9. jobs:
  10. benchmark:
  11. name: benchmark
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v3
  15. - name: prepare
  16. run: |
  17. sudo apt update
  18. sudo apt install libssl-dev
  19. sudo apt install iperf
  20. sudo apt install nginx
  21. - name: make examples
  22. run: |
  23. ./configure
  24. make examples
  25. - name: build echo-servers
  26. run: |
  27. bash echo-servers/build.sh
  28. - name: benchmark echo-servers
  29. run: |
  30. bash echo-servers/benchmark.sh
  31. - name: benchmark tcp_proxy_server
  32. run: |
  33. iperf -s -p 5001 > /dev/null &
  34. bin/tcp_proxy_server 1212 127.0.0.1:5001 &
  35. iperf -c 127.0.0.1 -p 5001 -l 8K
  36. iperf -c 127.0.0.1 -p 1212 -l 8K
  37. - name: webbench
  38. run: |
  39. sudo nginx -c /etc/nginx/nginx.conf
  40. sudo cp html/index.html index.html
  41. sudo cp html/index.html /var/www/html/index.html
  42. bin/httpd -c etc/httpd.conf -d
  43. ps aux | grep nginx
  44. ps aux | grep httpd
  45. bin/tinyhttpd 9090 &
  46. echo -e "\n======Test nginx send file==============================="
  47. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:80/
  48. echo -e "\n======Test libhv/httpd send file (with FileCache)========"
  49. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:8080/
  50. echo -e "\n======Test libhv/tinyhttpd send file (no FileCache)======"
  51. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:9090/
  52. echo -e "\n======Test nginx 404 Not Found==========================="
  53. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:80/404
  54. echo -e "\n======Test libhv/httpd 404 Not Found====================="
  55. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:8080/404
  56. echo -e "\n======Test libhv/tinyhttpd 404 Not found================="
  57. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:9090/404
  58. echo -e "\n======Test libhv/httpd /ping============================="
  59. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:8080/ping
  60. echo -e "\n======Test libhv/tinyhttpd /ping========================="
  61. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:9090/ping