{"id":15156815,"url":"https://github.com/puppetlabs/gatling-puppet-load-test","last_synced_at":"2025-09-30T06:31:31.323Z","repository":{"id":8240511,"uuid":"9684046","full_name":"puppetlabs/gatling-puppet-load-test","owner":"puppetlabs","description":null,"archived":true,"fork":false,"pushed_at":"2022-02-24T14:17:45.000Z","size":8708,"stargazers_count":34,"open_issues_count":33,"forks_count":44,"subscribers_count":154,"default_branch":"master","last_synced_at":"2024-09-28T02:43:21.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2013-04-25T23:58:01.000Z","updated_at":"2023-12-07T22:19:42.000Z","dependencies_parsed_at":"2022-08-06T23:15:23.895Z","dependency_job_id":null,"html_url":"https://github.com/puppetlabs/gatling-puppet-load-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fgatling-puppet-load-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fgatling-puppet-load-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fgatling-puppet-load-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fgatling-puppet-load-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/gatling-puppet-load-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234712681,"owners_count":18875498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-26T19:41:32.097Z","updated_at":"2025-09-30T06:31:29.930Z","avatar_url":"https://github.com/puppetlabs.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/puppetlabs/gatling-puppet-load-test.svg?branch=master)](https://travis-ci.com/puppetlabs/gatling-puppet-load-test)\n\n# Running Performance Test Profiles\n\n#### Table of Contents\n\n1. [Setup](#setup)\n1. [PE trial performance test](#pe-trial-performance-test)\n1. [Apples to Apples performance tests](#apples-to-apples-performance-tests)\n1. [Opsworks performance tests](#opsworks-performance-tests)\n1. [Soak performance tests](#soak-performance-tests)\n1. [Scale performance tests](#scale-performance-tests)\n1. [Acceptance tests](#acceptance-tests)\n1. [Other Topics](#other-topics)\n    * [BigQuery Data Comparisons](#bigquery-data-comparisons)\n    * [Just set up PE and Gatling](#set-up-puppet-enterprise-and-gatling-but-do-not-execute-a-gatling-scenario)\n    * [Record a Gatling run](#record-a-gatling-run)\n    * [Start a pre-recorded run](#start-a-pre-recorded-run)\n    * [Analyze results](#analyze-results)\n    * [Abort a test run](#abort-a-test-run)\n    * [Generate reports for aborted runs](#generate-reports-for-aborted-runs)\n\n\n## Setup\n\n**TODO:**\n\n* Define the term 'Apples to Apples'.\n\n* Define the term 'KO'.\n\n\n### Requirements\n\nIn order to run the software in this repo, you need the following\nrequirements installed.\n\n* [Ruby](https://www.ruby-lang.org/en/)\n* [Bundler](https://bundler.io/)\n* [OpenJDK](https://openjdk.java.net/)\n\n\u003e **NOTE:** These tasks run for several hours. It is not recommended to run\n\u003e them directly from a workstation. You should use a dedicated VM instance to\n\u003e control these tasks.\n\n### Environment setup\n\n* Clone the gatling-puppet-load-test repo locally: https://github.com/puppetlabs/gatling-puppet-load-test\n* cd into the gatling-puppet-load-test root directory\n* Gather the necessary ruby packages by running `bundle install`.\n\n\nSeveral infrastructure variants are currently supported by the rake tasks in\nthis repo.  The specific environment setup steps for each environment are\noutlined below.\n\n#### Environment variables\n\nThe following environment variables are largely common to the rake tasks shown\nbelow.  They are as follows.\n\n`REF_ARCH`\n_(S, L)_ : The desired architecture to be provisioned.  The default is `S`\nwhich designates a\n[Standard Reference Architecture](https://puppet.com/docs/pe/latest/choosing_an_architecture.html#monolithic-installation).\nSetting this variable to `L` will enable provisioning a\n[Large Reference Architecture](https://github.com/reidmv/reidmv-pe_xl/blob/master/documentation/large_deploy.md).\nThe **Large Reference Architecture** is only supported for a PE installation\nand should not be used when deploying a FOSS installation.\n\n`BEAKER_INSTALL_TYPE`\n_(git, foss, pe)_ : Determines the underlying path structure of the\npuppet install.\n\n`BEAKER_PE_VER`\n: The desired PE version to be installed. Must be available within\nthe `BEAKER_PE_DIR`.\n\n`BEAKER_PE_DIR`\n: Path or URL where PE builds are stored for the `BEAKER_PE_VER`.\n\n`PACKAGE_BUILD_VERSION`\n: Puppet Server build version to install (FOSS only).\n\n`PUPPET_AGENT_VERSION`\n: Puppet Agent build version to install (FOSS only).\n\n\nIt can be helpful to use an env file to manage these environment variables. The file\n[config/env/env_setup_2019.0.1](config/env/env_setup_2019.0.1) is provided as an example.\n\nApply this configuration with the following command:\n```\nsource config/env/env_setup_2019.0.1\n```\n\nFor more information, see the Beaker documentation on\n[beaker environment variables](https://github.com/puppetlabs/beaker/blob/master/docs/concepts/argument_processing_and_precedence.md#environment-variables)\n\n\n#### For AWS Execution\n\n[Create an AWS access key pair for your AWS account.](https://aws.amazon.com/premiumsupport/knowledge-center/create-access-key/)\nEnsure that the key id and secret key are present in an appropriate section of\nyour `$HOME/.fog` file.  Here is an example: _FIXME: Reference fog website._\n```\n:default:\n  :aws_access_key_id: \u003caccess key here\u003e\n  :aws_secret_access_key: \u003csecret key here\u003e\n```\n\n\n##### ABS (Always Be Scheduling)\n\n\u003e **NOTE:** This facility is not publicly available and can only be used by\n\u003epersonnel employed by Puppet the company.\n\n\u003e **NOTE:** AWS instances provided by ABS are automatically destroyed after 24\n\u003e hours by the\n\u003e [AWS EC2 Reaper](https://github.com/puppetlabs/aws_resource_reaper/tree/master/lambdas/ec2#aws-ec2-reaper).\n\u003e The lifetime of these instances can be set to an alternative value by setting\n\u003e the desired lifetime with the `ABS_AWS_REAP_TIME` environment variable in\n\u003e seconds.\n\nAlternatively, the lifetime can be specified in days via the `ABS_AWS_REAP_DAYS` environment variable.\nSetting this variable will override any value set for the `ABS_AWS_REAP_TIME` environment variable.\n\nIn either case, the value is ultimately specified in seconds as the `reap_time` parameter of the request to the [`awsdirect` endpoint](https://github.com/puppetlabs/always-be-scheduling#apiv2awsdirect).\nThis is translated to the `termination_date` tag specified by ABS for the EC2 instance; it can be manually edited in the EC2 console to change the specified value.\n\nThe Terminator component of the Reaper runs periodically to ensure that all EC2 instances are terminated if they are past their `termination_date`.\n\n* In order to use an AWS account with access to\n  puppetlabs network resources, you need to use\n  [ABS](https://github.com/puppetlabs/always-be-scheduling).\n  The `performance` task will automatically use ABS to provision two AWS\n  instances ('master' and 'metrics') and then execute tests against those\n  instances.\n\n* ABS requires a token when making requests. See the\n  [Token operations](https://github.com/puppetlabs/always-be-scheduling#token-operations)\n  section of the\n  [ABS README](https://github.com/puppetlabs/always-be-scheduling/blob/master/README.md)\n  for instructions to generate a token.  Once generated, either set the\n  `ABS_TOKEN` environment variable with your token or add it to the .fog file in\n  your home directory using the abs_token parameter. For example:\n\n```\n:default:\n  :abs_token: \u003cyour abs token\u003e\n```\n\n#### For VMPooler Execution\n\nGet an access token for your\n[vmpooler](https://github.com/puppetlabs/vmpooler) instance:\n```\ncurl -u jdoe --url https://vmpooler.example.com/api/v1/token\n```\nFor more detailed information, please refer to the\n[vmpooler documentation](https://github.com/puppetlabs/vmpooler/blob/master/docs)\n\n\n## PE trial performance test\n\nThis repo includes a `pe-trial.rb` test to validate that an AWS m5.large can\neasily accommodate the 10 nodes allowed for a trial installation of Puppet\nEnterprise.  To run this test use the following command.  Please ensure that\nyou set the `BEAKER_PE_VER` and the `BEAKER_PE_DIR` to match the PE version\nthat you are testing.  The other environment variables should remain as defined\nbelow.\n```\n    BEAKER_TESTS=tests/pe-trial.rb \\\n    PUPPET_GATLING_SCENARIO=pe-trial.json \\\n    ABS_AWS_MASTER_SIZE=m5.large \\\n    BEAKER_PE_VER=2019.1.0 \\\n    BEAKER_PE_DIR=https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/archives/releases/2019.1.0 \\\n    BEAKER_INSTALL_TYPE=pe \\\n    bundle exec rake performance\n```\n\n## Apples to Apples performance tests\n\nBy default, the `performance` rake task will set up a puppet master and a\nGatling driver/metrics node.  It will then kick off a Gatling scenario defined\nfor apples to apples performance tests.  At the end of the run, the Gatling\nresults and atop results will be copied back to the test runner.\n\n\n### Basic usage\nYou can use the checked-in hosts files\n[pe-perf-test.cfg](config/beaker_hosts/pe-perf-test.cfg) or\n[foss-perf-test.cfg](config/beaker_hosts/foss-perf-test.cfg).  These are the\ndefaults for the performance rake task based on the specified\n`BEAKER_INSTALL_TYPE` (pe or foss).\n\n\n\n#### PE\nWhen testing a PE build, set `BEAKER_INSTALL_TYPE=pe` and provide values for\n`BEAKER_PE_VER` and `BEAKER_PE_DIR` environment variables.\n\nExample run\n```\nexport BEAKER_INSTALL_TYPE=pe\nexport BEAKER_PE_VER=2019.1.0\nexport BEAKER_PE_DIR=https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/archives/releases/2019.1.0\nexport BASELINE_PE_VER=2018.1.9\nexport GOOGLE_APPLICATION_CREDENTIALS=mysecret.json  # location of your google json key file\n\nbundle exec rake performance    # (takes about 4 hours)\n```\n\n\n#### FOSS\nWhen testing a FOSS build, set `BEAKER_INSTALL_TYPE=foss` and provide values\nfor `PACKAGE_BUILD_VERSION` and `PUPPET_AGENT_VERSION` environment variables.\n\nExample run\n```\nexport BEAKER_INSTALL_TYPE=foss\nexport PACKAGE_BUILD_VERSION=6.3.0\nexport PUPPET_AGENT_VERSION=6.4.2\n\nbundle exec rake performance    # (takes about 4 hours)\n```\n\n### Baseline comparison\nIn order to have a baseline comparison performed at the end of the test run\nset `BASELINE_PE_VER` and `GOOGLE_APPLICATION_CREDENTIALS` in order to\ngather the baseline data.  See\n[BigQuery Data Comparisons](#bigquery-data-comparisons) for details.\n\n\n### Rake tasks\n\n`performance`\n: Provisions, installs, and runs apples to apples test.\n\n`performance_against_already_provisioned`\n: Run tests against an existing set of hosts.  This task is only intended to be\nrun against the very latest set of provisioned hosts.\n\n`performance_deprovision_with_abs`\n: Destroy ABS hosts.  If the hosts are preserved via Beaker's `preserve_hosts`\nsetting, then you will need run this task when you are done with the hosts.\n\n\n### Custom Beaker Configuration\nIf deployments provided for the **Standard Reference Architecture** and **Large\nReference Architecture** do not meet your needs, create a beaker config file\nusing one of the configs in [config/beaker_hosts](config/beaker_hosts) as a\ntemplate.  Your custom beaker configuration will be used by the\n`performance_against_already_provisioned` task if it is available as an\nenvironment variable.\n\n```\nexport BEAKER_HOSTS=\u003cyour beaker_hosts file\u003e\n```\n\n\n## Opsworks performance tests\n\nIn order to execute the tests successfully with the `opsworks_performance` rake task, you must set the following environment variables:\n\n* `BEAKER_TESTS=tests/OpsWorks.rb`\n\n* `ABS_AWS_MASTER_SIZE` to one of the following:\n    * `ABS_AWS_MASTER_SIZE=m5.large`\n    * `ABS_AWS_MASTER_SIZE=c4.xlarge`\n    * `ABS_AWS_MASTER_SIZE=c4.2xlarge`\n    * `ABS_AWS_MASTER_SIZE=\"\"`\n\n* `PUPPET_SCALE_CLASS` to one of the following:\n    * `PUPPET_SCALE_CLASS=role::by_size::small`\n    * `PUPPET_SCALE_CLASS=role::by_size::medium`\n    * `PUPPET_SCALE_CLASS=role::by_size::large`\n    * `PUPPET_SCALE_CLASS=\"\"`\n\nExecute:\n```\nbundle exec rake opsworks_performance    # (takes about 1.5 hours)\n```\n\n\n## Soak performance tests\n\nThe soak performance test executes a long-running scenario under medium load:\n* 14 days\n* 600 agents\n* `role::by_size::large`\n\nA set of soak rake tasks are provided to handle setup and test execution,\nallowing nodes to be provisioned as part of the run or as a separate step.  The\npre-suite includes tuning of the master via `puppet infrastructure tune`.\n\nWhen using the soak rake tasks the `BEAKER_PRESERVE_HOSTS` environment variable\nis always set to `true`, so you will need to de-provision the test nodes with\nthe `performance_deprovision_with_abs` when your testing is complete.\n\nTo ensure AWS instances are not terminated before the test completes and\npost-test steps are performed the soak rake task sets the reap time to 30 days\nvia the `ABS_AWS_REAP_DAYS` environment variable.  This value can be overridden\nby specifying a different value for the environment variable.\n\n### To provision and set up nodes as part of the run:\n\n```\nbundle exec rake soak\n```\n\n### To provision and set up nodes separately:\n\nRun the `soak_setup` rake task to provision and set up the nodes:\n```\nbundle exec rake soak_setup\n```\n\nThen run the 'soak_provisioned' rake task to run the soak test:\n```\nbundle exec rake soak_provisioned\n```\n\n### De-provision the nodes when testing is complete\n\n```\nbundle exec rake performance_deprovision_with_abs\n```\n\n\n## Scale performance tests\n\nThe scale performance test runs a single repetition of the scenario, increasing the agent count over multiple iterations.\nThe default Scale scenario starts with 3000 agents and a 30 minute ramp up (corresponding to the default puppet agent check-in interval).\nThe scenario to run can be specified via the `PUPPET_GATLING_SCALE_SCENARIO` environment variable.\n\nBy default the scenario is run for 10 iterations, increasing the agent count by 100 for each iteration.\nThese values can be specified via the `PUPPET_GATLING_SCALE_ITERATIONS` and `PUPPET_GATLING_SCALE_INCREMENT` environment variables.\n\nAfter each iteration completes the results are checked and if a KO is found the test is failed.\n\nThe results for each iteration are copied to a folder named 'PERF_SCALE{$SCALE_TIMESTAMP}' in `results/scale`.\nThe sub-directory for each iteration is named based on the scenario, iteration, and number of agents.\n\nAs with the Apples to Apples performance tests, to run against a FOSS build, set\n`BEAKER_INSTALL_TYPE=foss` and provide values for `PACKAGE_BUILD_VERSION` and\n`PUPPET_AGENT_VERSION` environment variables.\n\nIn order to execute a Scale performance run:\n\n### Provision, tune, run\n\nA set of 'autoscale' rake tasks are provided to handle setup and scale test execution.\nThe pre-suite has been updated to include tuning of the master via 'puppet infrastructure tune' for scale tests so this is no longer a manual step.\nAs with the other test types, nodes can be provisioned as part of the run or as a separate step.\n\nWhen using the autoscale rake tasks the `BEAKER_PRESERVE_HOSTS` environment variable is always set to 'true', so you will need to de-provision the test nodes with the `performance_deprovision_with_abs` when your testing is complete.\n\n#### To provision nodes as part of the run:\n\n```\nbundle exec rake autoscale\n```\n\n#### To provision nodes separately:\n\nRun the `autoscale_setup` rake task to provision the nodes:\n```\nbundle exec rake autoscale_setup\n```\n\nThen run the 'autoscale_provisioned' rake task to run the scale test:\n```\nbundle exec rake autoscale_provisioned\n```\n\n#### De-provision the nodes when testing is complete\n\n```\nbundle exec rake performance_deprovision_with_abs\n```\n\n#### Smaller autoscale tasks\n\nThere are additional rake tasks for small and medium autoscale runs to allow testing of the environment and autoscale functionality without waiting for a full run:\n\n`autoscale_provisioned_tiny`\n- 1 agent\n- 3 iterations\n- increment by 1\n\n`autoscale_provisioned_sm`\n- 10 agents\n- 10 iterations\n- increment by 10\n\n`autoscale_provisioned_med`\n- 500 agents\n- 10 iterations\n- increment by 100\n\n\n## Acceptance tests\n\nYou can execute the `acceptance` rake task resulting in a much shorter Gatling\nrun.  This task runs VMPooler by default.  This is useful for quickly testing\nchanges to the performance test setup.\n\nThe [expected environment variables](#environment-variables) must be set prior\nto executing this task.  Additional environment variables can be set\nindividually or stored in a file and referenced by setting the\n`BEAKER_OPTIONS_FILE` environment variable prior to executing this task.  This\nrepo includes [options files](setup/options), but if you have specific needs\nyou must craft an options file that meets your needs.  Here is an example.\n\n```\nexport BEAKER_OPTIONS_FILE='setup/options/options_pe.rb'\n```\n\n\n### Using AWS\n\nTo run the task in an AWS environment, you need to set environment variables\nfor `ABS_OS` and `BEAKER_HOSTS`.  Here is an example:\n\n```\nABS_OS=centos-7-x86-64-west BEAKER_HOSTS=config/beaker_hosts/pe-perf-test.cfg\n```\n\n\n\n## Other Topics\n\n### BigQuery Data Comparisons\n\nIn order to use the BigQuery integration, you will need to perform the following steps:\n\n* Choose to create a new key for the perf-metrics service account - https://console.developers.google.com/iam-admin/serviceaccounts/project?project=perf-metrics\u0026organizationId=635869474587\n\n* Download it and save locally.\n\n* `export GOOGLE_APPLICATION_CREDENTIALS=` setting to the location you have saved the json key file.\n\nIf you want to push the metrics to BigQuery at the end of the test run set:\n\n`export PUSH_TO_BIGQUERY=true`\n\nBy default this will be set to `false` when running locally and `true` when jobs run in CI.\n\nTo perform a comparison, set `BASELINE_PE_VER` to the version of PE you want to compare against.\n\nThings to note:\n\n* If `BASELINE_PE_VER` has not been set then the baseline comparison\n  assertions in the last test step will not be run (test step will be skipped).\n\n* The string specified for the `BASELINE_PE_VER` must exactly match the string\n  specified as the `BEAKER_PE_VER` when that test run was executed. For\n  example, if `BEAKER_PE_VER=2018.1.1-rc0-11-g8fbde83` was specified for a\n  test run, `BASELINE_PE_VER=2018.1.1-rc0-11-g8fbde83` must be specified in\n  the future to use that specific test run as the baseline.\n\n* If `BASELINE_PE_VER` is not found in BigQuery then the last step will error.\n\n* Results are not overwritten, we get the latest result that matches `BASELINE_PE_VER` and the current test name.\n\n* We currently only push up the data we need in order to perform the assertions.\n\nTo directly query bigquery:\n\n* Navigate to https://console.cloud.google.com/bigquery?project=perf-metrics\n\n* Execute 'SELECT pe_build_number FROM \\`perf-metrics.perf_metrics.atop_metrics\\`\nGROUP BY pe_build_number'\n\n\n### Set up Puppet Enterprise and Gatling but do not execute a Gatling scenario\n\nAnother use for the performance task would be to record and playback a new scenario either for one-off testing,\nor for a new scenario that will be checked in and used.  Additionally, you may just want to execute the setup standalone and then execute the tests later.\n\n* Follow the _Apples to Apples_ instructions, but also `export BEAKER_TESTS=` and `BEAKER_PRESERVE_HOSTS=always` prior to executing the rake task to tell beaker not to execute any tests and preserve the machines.\n\n* Depending on your use case, you can also choose to execute the 'acceptance' task which will run in vmpooler rather than AWS. This is useful when testing/debugging but not for actual performance measurement.\n\n\n### Record a Gatling run\n\nAssuming that you ran the performance task with no tests, you can follow the directions below to record and then play back a recording manually.\n\n* Ensure you are still SSH'd to the Gatling driver node (metrics) using the -Y argument `ssh -Y root@\u003cdriver-host\u003e`\n\n* Execute `cd ~/gatling-puppet-load-test/proxy-recorder`\n\n* Execute `sh ./launch-gatling-proxy.sh`\n\n* Follow the steps from the script\n\n* In the Gatling recorder GUI:\n    * Change the 'listening port' to 7000\n    * Change 'class name' to a unique value with no spaces such as 'HoytApples' - remember this, as this is the \\\u003cGatlingClassName\u003e in subsequent steps.\n    * Press start\n\n* Back in the cmd line on the Gatling driver node, press 'enter'\n\n* Copy the command to execute on the agent node\n\n* SSH into the agent node and:  (Ignore instructions from the script)\n    * Paste in the command\n    * Replace value for --server with the FQDN of the Master\n    * Replace value for --http_proxy_host with the IP address of the Gatling driver node\n    * Change the value for --http_proxy_port to 7000\n    * Execute the command\n\n* Ensure that traffic was captured (rows should appear in the 'executed events' section of the Gatling recorder GUI)\n\n* Press 'Stop and Save'\n\n* Close the GUI\n\n* On the Gatling driver node, press enter\n\n* Continue to follow the script.\n    * When asked for the certname prefix enter any value containing the string 'agent'. For example perf-agent-0\n    * When asked for Puppet classes, enter the configuration which defaults to: role::by_size::large\n        * You can use a different puppet class by specifying it as the `PUPPET_SCALE_CLASS` environment variable for the `performance_gatling` rake task.\n\n\n### Start a pre-recorded run\n\nFor the following steps, GatlingClassName is the value entered into the ClassName field during the recording step.\nFrom root of the gatling-puppet-load-test source dir on the Gatling driver (metrics):\n\n* First time only: edit /usr/share/sbt/conf/sbtopts ensure '-mem' set to 2048\n```\nsed -i 's/^#.*-mem.*$/-mem 2048/' /usr/share/sbt/conf/sbtopts\n```\n\n* For each new simulation:\n    * `cd ~/gatling-puppet-load-test/simulation-runner`\n    * `export GEM_SOURCE=http://rubygems.delivery.puppetlabs.net`\n    * `export SUT_HOST=\u003cMASTER_OR_LB_HOSTNAME\u003e.us-west-2.compute.internal`\n    * Create a json file containing your settings at config/scenarios/\\\u003cGatlingClassName\u003e.json, example here: Gist **FIXME: Broken gist link**\n\n        * Change node_config to \\\u003cGatlingClassName\u003e.json (this file should exist in simulation-runner/config/nodes)\n    * `export PUPPET_GATLING_SIMULATION_CONFIG=../simulation-runner/config/scenarios/\u003cGatlingClassName\u003e.json`\n    * `export PUPPET_GATLING_SIMULATION_ID=\u003cGatlingClassName\u003e`\n    * `PUPPET_GATLING_MASTER_BASE_URL=https://$SUT_HOST:8140 sbt run`\n\n\n### Analyze results\n\n* Gatling results, including HTML visualizations show up in the directory: gatling-puppet-load-test/simulation-runner/results/\\\u003cGatlingClassName\u003e-\\\u003cepoch_time\u003e/\n    * scp them locally and you can view them in your browser.\n\n* atop files containing cpu, mem, disk and network usage overall and broken down per process are available to view on the master\n    * `atop -r /var/log/atop/atop\\_\\\u003cdate\u003e`\n    * See the atop man file for interactive commands\n\n\n### Abort a test run\n\nThe easiest way to immediately kill a test run is to kill the corresponding Java process on the metrics node. Find the process id with top and then use `kill \u003cPID\u003e`.\n\n### Generate reports for aborted runs\n\nIf a Gatling scenario is aborted the reports may not be generated. In this case you can run Gatling in reports-only mode to generate the reports for a previous run (assuming that the hosts have been preserved).\nYou'll need to specify the name of the folder on the metrics node containing the simulation.log file for the run.\nLook in `~/gatling-puppet-load-test/simulation-runner/results` for a folder that starts with 'PerfTestLarge-' followed by the run id and verify that the folder contains a valid (non-empty) simulation.log file.\n\nIf you find that the simulation.log file is not being populated during your run you may need to reduce the log buffer size from the 8kb default.\nSet `gatling.data.file.bufferSize` in `simulation-runner/gatling.conf` to a smaller value like 256 (this may impact performance).\n\nTo run in reports-only mode, run as you normally would against previously provisioned hosts and set the environment variables `PUPPET_GATLING_REPORTS_ONLY=true` and `PUPPET_GATLING_REPORTS_TARGET=\u003cYOUR_RESULT_FOLDER\u003e`.\n\nFor example:\n```\nbundle exec rake performance_against_already_provisioned \\\n    BEAKER_INSTALL_TYPE=pe \\\n    BEAKER_PRESERVE_HOSTS=always \\\n    PUPPET_GATLING_REPORTS_ONLY=true \\\n    PUPPET_GATLING_REPORTS_TARGET=PerfTestLarge-1524773045554\n```\n\nAfter the run you should see that the report files have been generated within the result folder and copied to your local machine.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fgatling-puppet-load-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fgatling-puppet-load-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fgatling-puppet-load-test/lists"}