benchmark.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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-18.04
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: prepare
  16. run: |
  17. sudo apt update
  18. sudo apt install libssl-dev
  19. sudo apt install nginx
  20. - name: make tinyhttpd httpd wrk
  21. run: |
  22. ./configure
  23. make tinyhttpd httpd wrk
  24. - name: build echo-servers
  25. run: |
  26. bash echo-servers/build.sh
  27. - name: benchmark echo-servers
  28. run: |
  29. bash echo-servers/benchmark.sh
  30. - name: webbench
  31. run: |
  32. sudo nginx -c /etc/nginx/nginx.conf
  33. sudo cp html/index.html index.html
  34. sudo cp html/index.html /var/www/html/index.html
  35. bin/httpd -c etc/httpd.conf -d
  36. ps aux | grep nginx
  37. ps aux | grep httpd
  38. bin/tinyhttpd 9090 &
  39. echo -e "\n======Test nginx send file==============================="
  40. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:80/
  41. echo -e "\n======Test libhv/httpd send file (with FileCache)========"
  42. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:8080/
  43. echo -e "\n======Test libhv/tinyhttpd send file (no FileCache)======"
  44. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:9090/
  45. echo -e "\n======Test nginx 404 Not Found==========================="
  46. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:80/404
  47. echo -e "\n======Test libhv/httpd 404 Not Found====================="
  48. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:8080/404
  49. echo -e "\n======Test libhv/tinyhttpd 404 Not found================="
  50. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:9090/404
  51. echo -e "\n======Test libhv/httpd /ping============================="
  52. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:8080/ping
  53. echo -e "\n======Test libhv/tinyhttpd /ping========================="
  54. bin/wrk -c 100 -t 2 -d 10s http://127.0.0.1:9090/ping