41. Test de càrrega sites en cloud extern. - Grupo 6

De Wiket
Salta a la navegació Salta a la cerca

WRK

Para hacer este tipo de pruebas podemos utilizar una herramienta llamada WRK.
Esta herramienta nos la ha facilitado nuestro compañero Joel. Utilizaremos la siguiente "guía" como refuerzo para su instalación y uso: https://www.wpsysadmin.com/blog/2021/03/23/test-estres-wordpress/

Instalación

Lo primero que hemos de hacer es descargar y compilar la herramienta.

apt -y install build-essential libssl-dev git unzip
cd
git clone https://github.com/wg/wrk.git wrk
cd wrk
make
cp wrk /usr/local/bin   


Apartir de este momento podemos ejecutar la herramienta y ver sus opciones.

Usage: wrk <options> <url>
  Options:
    -c, --connections <N>  Connections to keep open
    -d, --duration    <T>  Duration of test
    -t, --threads     <N>  Number of threads to use
    -s, --script      <S>  Load Lua script file
    -H, --header      <H>  Add header to request
        --latency          Print latency statistics
        --timeout     <T>  Socket/request timeout
    -v, --version          Print version details
  Numeric arguments may include a SI unit (1k, 1M, 1G)
  Time arguments may include a time unit (2s, 2m, 2h)