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

Running a Benchmark

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

When you have setup and configured a benchmarking profile with the init command, you can then use it to run benchmarks against your Shopware store.

The command is called run and requires the name of the benchmarking profile file specified with the -c flag:

php bin/sw-bench run -c myprofile.json

This will start a benchmark that will run (by default) for 60 minutes.

On the first run, the command will recognize the fixture files are missing and it will download and process the store's sitemap.xml to retrieve product and category URLs.

It is recommended to run sw-bench against a testing or staging system first and carefully configuring it to run against production. See last section about data created during a production run.

NOTE: Running benchmarks is essentially a DOS attack on your own infrastructure. You can take your site down running a benchmark with too much load. You should never run this against a competitors site, some countries might even consider this a felony under hacking laws.

Requirements for Shopware Stores

  • Store has to have a sitemap.xml listing all products and categories.
  • At the moment all users checking out or registering are doing to selecting the first country in the account form.
  • All checkouts are using the default payment method. This should be an invoice based payment method without further interaction required. Checkout with sw-bench does not work with complex payment methods such as PayPal or anything that requires Javascript.

Orders and Customers created during benchmark

The benchmark creates orders and customers unless the guest ratio is configured to be 100% and the conversion rate is 0%.

If you run sw-bench against production you should be aware that this might trigger follow up processes from other systems you integrated with such as CRM or inventory. If you don't want this to happen, use a staging system instead or put code in place that detects the sw-bench generated data.

  • Users are created with the e-mail pattern user-{$uuid}@example.com
  • Orders are created using random products and quantities with email pattern user-{$uuid}@example.com