code

siege – Pruebas de carga en modo fácil

siege ( https://github.com/JoeDog/siege ) es una herramienta sencilla para hacer pruebas de carga contra una aplicación web (http), la forma de instalarlo dependerá de la distribución que utilices, a continuación van algunos ejemplos de cómo utilizarlo.

La opción b es de BENCHMARK no habrá intervalos de demora entre solicitudes, con t se especifica que será por 60 segundos:

root@unknown:~# siege -b -t60s http://localhost
** SIEGE 4.0.4
** Preparing 25 concurrent users for battle.
The server is now under siege...
HTTP/1.1 200     0.02 secs:      45 bytes ==> GET  /
Lifting the server siege...HTTP/1.1 200     0.00 secs:      45 bytes ==> GET  /
HTTP/1.1 200     0.01 secs:      45 bytes ==> GET  /

Transactions:                  67288 hits
Availability:                 100.00 %
Elapsed time:                  59.07 secs
Data transferred:               2.89 MB
Response time:                  0.01 secs
Transaction rate:            1139.12 trans/sec
Throughput:                     0.05 MB/sec
Concurrency:                   15.20
Successful transactions:       67290
Failed transactions:               0
Longest transaction:            0.47
Shortest transaction:           0.00

La opción c especifica concurrencia, d especifica tiempo de demora entre solicitudes, t es el tiempo a ejecutarse:

betanzos@unknown:~$ siege -c50 -d10 -t3M http://localhost
** SIEGE 4.0.4
** Preparing 50 concurrent users for battle.
The server is now under siege...
Lifting the server siege...
Transactions:                   1884 hits
Availability:                 100.00 %
Elapsed time:                 179.62 secs
Data transferred:               0.08 MB
Response time:                  0.00 secs
Transaction rate:              10.49 trans/sec
Throughput:                     0.00 MB/sec
Concurrency:                    0.04
Successful transactions:        1884
Failed transactions:               0
Longest transaction:            0.09
Shortest transaction:           0.00

gg