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

Add documentation for local setup #30

Open
beberlei opened this issue Feb 2, 2022 · 3 comments
Open

Add documentation for local setup #30

beberlei opened this issue Feb 2, 2022 · 3 comments

Comments

@beberlei
Copy link
Contributor

beberlei commented Feb 2, 2022

There is the need to document the necessary setup for a local machine running sw-bench:

  • Locust + locust plugins
  • Docker (optional)
  • PHP 8.1 + hdrhistogram extension
  • wkhtmltopdf if a PDF should be generated (allow skipping that to only have html report)
@Xarno
Copy link

Xarno commented Mar 21, 2022

Yes please, its totally needed. I tried it and it took me 2 hours to find all the bits.

On the short guide: https://github.com/tideways/shopware6-benchmarking/wiki/Installation

Step 5: (On Mac with M1 chip)

# locust-plugis need pg_config in path
ln -s /opt/homebrew/Cellar/libpq/14.2/bin/pg_config /opt/homebrew/bin/pg_config 
/opt/homebrew/opt/[email protected]/bin/python3.9 -m pip install --upgrade pip
# locust-plugins need librdkafka
brew install locust librdkafka
# build of locust-plugins need homebrew paths values
# ! watch the version number of openssl 
C_INCLUDE_PATH=/opt/homebrew/Cellar/librdkafka/1.8.2/include/
export C_INCLUDE_PATH
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/Cellar/librdkafka/1.8.2/lib:/opt/homebrew/Cellar/[email protected]/1.1.1m/lib
pip3 install locust-plugins

add the php extension:
It need to be build with older c library (0.11.2) https://github.com/HdrHistogram/HdrHistogram_c/releases/tag/0.11.2
And in hdrhistogram.c there are 2 ulong num_key occurences which needs to be zend_ulong num_key.

and then yust add the extension to php.ini, restart apache and you are done with step 5.

@beberlei
Copy link
Contributor Author

The code should work without the hdrhistogram extension, what is the exception message when its not installed? There is a factory method that decides between hdrhistogram and a PHP based implementation. Is it missing in one spot?

I fixed the ulong problem in hdrhistogram-php

@beberlei
Copy link
Contributor Author

@Xarno fixed the dependency on hdrhistogram, it should work without now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants