st-tech / gatling-operator

Automating distributed Gatling load testing using Kubernetes operator
MIT License
68 stars 21 forks source link

add option to create reports in each pod #30

Closed kayamin closed 2 years ago

kayamin commented 2 years ago

Description

Use case

Test

❯ k describe po zozo-feature-flags-api-load-test-runner-cq2pf | grep gatling.sh
      gatling.sh -sf ${SIMULATIONS_DIR_PATH} -s ZozoFeatureFlagsApi -rsf ${RESOURCES_DIR_PATH} -rf ${RESULTS_DIR_PATH}

❯ k logs -f api-load-test-runner-cq2pf -c gatling-runner

Wait until 2022-01-18 07:40:59
GATLING_HOME is set to /opt/gatling
Simulation Api started...

================================================================================
2022-01-18 07:41:15                                           0s elapsed
---- Requests ------------------------------------------------------------------
> Global                                                   (OK=1      KO=0     )

---- API (dev) ----------------------------------------------
[##########################################################################]100%
          waiting: 0      / active: 0      / done: 1
================================================================================

Simulation Api completed in 0 seconds
Parsing log file(s)...
Parsing log file(s) done
Generating reports...

================================================================================
---- Global Information --------------------------------------------------------
> request count                                          1 (OK=1      KO=0     )
> min response time                                    163 (OK=163    KO=-     )
> max response time                                    163 (OK=163    KO=-     )
> mean response time                                   163 (OK=163    KO=-     )
> std deviation                                          0 (OK=0      KO=-     )
> response time 50th percentile                        163 (OK=163    KO=-     )
> response time 75th percentile                        163 (OK=163    KO=-     )
> response time 95th percentile                        163 (OK=163    KO=-     )
> response time 99th percentile                        163 (OK=163    KO=-     )
> mean requests/sec                                      1 (OK=1      KO=-     )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                             1 (100%)
> 800 ms < t < 1200 ms                                   0 (  0%)
> t > 1200 ms                                            0 (  0%)
> failed                                                 0 (  0%)
================================================================================

Reports generated in 0s.
❯ k describe po api-load-test-runner-hqzm5 | grep gatling.sh
      gatling.sh -sf ${SIMULATIONS_DIR_PATH} -s Api -rsf ${RESOURCES_DIR_PATH} -rf ${RESULTS_DIR_PATH} -nr

❯ k logs api-load-test-runner-hqzm5 -c gatling-runner
Wait until 2022-01-18 07:40:59
GATLING_HOME is set to /opt/gatling
Simulation Api started...

================================================================================
2022-01-18 07:41:15                                           0s elapsed
---- Requests ------------------------------------------------------------------
> Global                                                   (OK=1      KO=0     )

---- API (dev) ----------------------------------------------
[##########################################################################]100%
          waiting: 0      / active: 0      / done: 1
================================================================================

Simulation Api completed in 0 seconds
kayamin commented 2 years ago

@yokawasa I got it 👍

Merged #27 first and generate api reference doc with make docs and include docs/api.md as well

I rebased this feature branch to main branch and generated docs/api.md and commited

Generate CRD with make manifests and include config/crd/bases/gatling-operator.tech.zozo.com_gatlings.yaml file to the PR

I also commited the file. Sorry I did not understand this to be included. 🙏