Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Installation

Benjamin Eberlei edited this page Feb 14, 2022 · 5 revisions

Follow these steps to install swbench on your own machine, a continuous integration server, or a dedicated load-testing generation server.

Requirements

  • PHP 8.1+ with at least the json, dom, zlib and curl extensions
  • Docker or Locust directly installed via pip (See executionMode configuration)
  • wkhtmltopdf for PDF generation

Steps

  1. Checkout this repository
git clone [email protected]:tideways/shopware6-benchmarking.git swbench
  1. Install Composer dependencies
cd swbench
composer install

Note: You need Composer v2 or higher installed. See their documentation.

  1. Add bin folder to $PATH

Note: This step is optional, you can run sw-bench directly from the bin directory.

Either symlink bin/sw-bench into /usr/local/bin or add bin/ directory to the $PATH environment variable:

ln -s /path/to/swbench/bin/sw-bench /usr/local/bin/sw-bench
  1. Initialize your first benchmarking profile

sw-bench allows you to store multiple profiles for benchmarking, so that you can test different projects or the same project with different configuration. The configuration for a profile is stored in a JSON file and you can generate a new profile file with the init command:

php bin/sw-bench init -c my_site_50p_guests.json

See Configuration on the various way to configure a benchmarking profile.

  1. Install Locust

A worker machine that runs the benchmarks locally requires Locust to be installed. On Ubuntu this works with:

sudo pip3 install locust locust-plugins
  1. Install wkhtmltopdf

If you want to generate a PDF report in addition to the HTML report it is required to install wkhtmltopdf. On Ubuntu based Linux:

sudo apt install wkhtmltopdf

PDF generation may offer better results with wkhtmltopdf built directly by the authors instead of a distribution.

Clone this wiki locally