From 036b5de7a4424da5b0e0d964e248365ea4435bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Martins=20Filho?= Date: Thu, 12 Dec 2024 23:30:21 -0300 Subject: [PATCH 1/2] create yml updateversion and documentation about the new way to install Stressify --- docs/source/guide.rst | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/docs/source/guide.rst b/docs/source/guide.rst index 45f75ea..1aabca2 100644 --- a/docs/source/guide.rst +++ b/docs/source/guide.rst @@ -25,6 +25,70 @@ Finally, using the Julia language, it was also created to facilitate the creatio However, with Julia's vast mathematical and statistical library, it facilitates the creation of new metrics from the execution return, with a dictionary with all response times. +Installation +================ + +To install Stressify, you can use the following command: + +.. code-block:: bash + + $ julia -e 'using Pkg; Pkg.add("Stressify")' + + +Quick Start +=========== +To start using Stressify, you can use the following code: + +.. code-block:: julia + + using Stressify + + # Defined the options for the test, in this case we are using 5 VUs, 10 iterations and no duration + Stressify.options( + vus = 5, + iterations = 10, + duration = nothing + ) + + # After defining the options, we can run the test using the following code + results = Stressify.run_test( + Stressify.http_get("https://httpbin.org/get"), + Stressify.http_post("https://httpbin.org/post"; payload="{\"key\": \"value\"}", headers=Dict("Content-Type" => "application/json")), + Stressify.http_put("https://httpbin.org/put"; payload="{\"update\": \"data\"}", headers=Dict("Content-Type" => "application/json")), + Stressify.http_patch("https://httpbin.org/patch"; payload="{\"patch\": \"data\"}", headers=Dict("Content-Type" => "application/json")), + Stressify.http_delete("https://httpbin.org/delete") + ) + + +The code above will run a test with 5 VUs, 10 iterations and no duration. The test will execute 10 iterations of each request, totaling 50 iterations. + +The output will be a dictionary with the following structure: + +.. code-block:: bash + + ================== Stressify ================== + VUs : 5 + Iterações Totais : 50 + Taxa de Sucesso (%) : 100.0 + Taxa de Erros (%) : 0.0 + Requisições por Segundo: 10.55 + Transações por Segundo : 10.55 + Número de Erros : 0 + ---------- Métricas de Tempo (s) ---------- + Tempo Mínimo : 0.1609 + Tempo Máximo : 1.2139 + Tempo Médio : 0.4026 + Mediana : 0.3717 + P90 : 0.7145 + P95 : 0.793 + P99 : 1.2139 + Desvio Padrão : 0.2173 + ---------- Detalhamento de Tempos ---------- + Todos os Tempos (s) : 1.2139, 0.3449, 0.552, 0.3514, 0.2351, 0.1809, 0.3881, 0.3949, 0.3975, 0.1811, 0.7704, 0.6761, 0.3609, 0.3747, 0.1741, 0.2778, 0.3338, 0.45, 0.3367, 0.1683, 0.8838, 0.3846, 0.3703, 0.5831, 0.1645, 0.4906, 0.3726, 0.3708, 0.3667, 0.1713, 0.793, 0.388, 0.5088, 0.3749, 0.172, 0.1714, 0.3786, 0.3254, 0.369, 0.1609, 0.793, 0.5632, 0.3333, 0.3912, 0.1777, 0.1844, 0.4023, 0.4266, 0.7145, 0.1788 + ========================================================== + ---------- Resultados dos Checks ---------- + + Important Links ------------------- From f6fbf85cd47212c0c1b029bccf9689b0e99c5eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Martins=20Filho?= Date: Thu, 12 Dec 2024 23:30:35 -0300 Subject: [PATCH 2/2] create yml updateversion and documentation about the new way to install Stressify --- .github/workflows/update_version.yml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/update_version.yml diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml new file mode 100644 index 0000000..0da0527 --- /dev/null +++ b/.github/workflows/update_version.yml @@ -0,0 +1,35 @@ +name: Update JuliaHub Version + +on: + push: + tags: + - 'v*.*.*' + +jobs: + update_version: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v3 + + - name: Install Julia + uses: julia-actions/setup-julia@v1 + with: + version: '1.11' + + - name: Authenticate with JuliaHub + env: + JULIAHUB_TOKEN: ${{ secrets.JULIAHUB_TOKEN }} + run: | + julia -e 'using Pkg; Pkg.add("Registrator"); Pkg.add("TagBot")' + + - name: Trigger JuliaHub Update + env: + JULIAHUB_TOKEN: ${{ secrets.JULIAHUB_TOKEN }} + run: | + julia -e ' + using Registrator; + Registrator.register( + auth_token=ENV["JULIAHUB_TOKEN"] + ) + '