Juliasunn / video-web

Website for publishing and watching videos, etc...
0 stars 0 forks source link

Implement server benchmark testing #17

Open Juliasunn opened 3 months ago

Juliasunn commented 3 months ago

Fetch video request for one and many threads ApacheBench (ab) tool for benchmark testing:

apt-get install apache2-utils 
ab -V
Juliasunn commented 3 months ago

На сервер-приложение: ab -n 1000 -c 5 http://127.0.0.1:8081/api/video/feed

Document Path:          /api/video/feed
Document Length:        1215 bytes

Concurrency Level:      5
Time taken for tests:   0.976 seconds
Complete requests:      1000
Failed requests:        0
Requests per second:    1024.11 [#/sec] (mean)
Time per request:       4.882 [ms] (mean)
Time per request:       0.976 [ms] (mean, across all concurrent requests)
Transfer rate:          1364.15 [Kbytes/sec] received
Juliasunn commented 3 months ago

Только nginx-сервер (получить http страницу) ab -n 1000 -c 5 http://127.0.0.1:8082/main

Document Path:          /main
Document Length:        2511 bytes

Concurrency Level:      5
Time taken for tests:   0.161 seconds
Complete requests:      1000
Failed requests:        0
Requests per second:    6208.02 [#/sec] (mean)
Time per request:       0.805 [ms] (mean)
Time per request:       0.161 [ms] (mean, across all concurrent requests)
Transfer rate:          16878.05 [Kbytes/sec] received
Juliasunn commented 3 months ago

nginx-сервер+подзапрос авторизации http://127.0.0.1:8082/private/upload

Document Path:          /private/upload
Document Length:        5903 bytes

Concurrency Level:      5
Time taken for tests:   0.480 seconds
Complete requests:      1000
Failed requests:        0
Requests per second:    2082.67 [#/sec] (mean)
Time per request:       2.401 [ms] (mean)
Time per request:       0.480 [ms] (mean, across all concurrent requests)
Transfer rate:          12378.08 [Kbytes/sec] received
Juliasunn commented 3 months ago

valgrind ./HttpLiveStreaming

==9661== HEAP SUMMARY:
==9661==     in use at exit: 10,933,649 bytes in 5,128 blocks
==9661==   total heap usage: 42,420 allocs, 37,292 frees, 147,366,608 bytes allocated
==9661== 
==9661== LEAK SUMMARY:
==9661==    definitely lost: 4,300,096 bytes in 44 blocks
==9661==    indirectly lost: 0 bytes in 0 blocks
==9661==      possibly lost: 2,408 bytes in 20 blocks
==9661==    still reachable: 6,631,145 bytes in 5,064 blocks
==9661==                       of which reachable via heuristic:
==9661==                         newarray           : 1,536 bytes in 16 blocks
==9661==         suppressed: 0 bytes in 0 blocks
==9661== Rerun with --leak-check=full to see details of leaked memory