2017-06-03 01:02:34 +02:00
## Setup Environment on a clean machine
2017-06-03 00:53:22 +02:00
### Windows
Install Visual Studio 2015 before running the following commands. Make sure C++ tools are enabled.
Run `cmd` as administrator.
powershell
2017-06-22 22:21:02 +02:00
Set-ExecutionPolicy Unrestricted
2017-07-07 03:43:31 +02:00
.\setup_env_windows.ps1 < PHP_VERSION - 7 . x . x > < PHP_THREAD - ts or nts > < Absolute path to driver source folder > < ARCH - x86 or x64 >
2017-06-22 22:21:02 +02:00
2017-06-03 00:53:22 +02:00
### Ubuntu 16
2017-07-15 01:38:56 +02:00
sudo env "PATH=$PATH" bash setup_env_unix.sh Ubuntu16 < PHP_VERSION - 7 . x . x > < PHP_THREAD - ts or nts > < Absolute path to driver source folder >
2017-06-03 00:53:22 +02:00
### RedHat 7
2017-07-15 01:38:56 +02:00
sudo env "PATH=$PATH" bash setup_env_unix.sh RedHat7 < PHP_VERSION - 7 . x . x > < PHP_THREAD - ts or nts > < Absolute path to driver source folder >
2017-06-03 00:53:22 +02:00
### Sierra
`brew` cannot be run with `sudo` on Sierra. Either enable passwordless `sudo` on the machine or enter the password when prompted.
bash setup_env_unix.sh Sierra < PHP_VERSION - 7 . x . x > < PHP_THREAD - ts or nts > < Absolute path to driver source folder >
2017-06-22 22:21:02 +02:00
## Run benchmarks
2017-07-12 23:35:54 +02:00
PHPBench is used to run the benchmarks. Visit http://phpbench.readthedocs.io/en/latest/introduction.html to have an idea how the tool works.
2017-05-23 22:57:10 +02:00
2017-07-15 01:44:03 +02:00
### 1. Modify lib/connect.php with the test database credentials
2017-06-22 22:21:02 +02:00
### 2. Execute run-perf_tests.py.
2017-07-14 20:05:23 +02:00
### Windows
py.exe run-perf_tests.py -platform < PLATFORM > -iterations < ITERATIONS > -iterations-large < ITERATIONS_LARGE > -result-server < RESULT_SERVER > -result-db < RESULT_DB > -result-uid < RESULT_UID > -result-pwd < RESULT_PWD
### Linux and Mac
2017-07-12 23:35:54 +02:00
On Linux and Mac, the script must be executed with `sudo python3` because to enable pooling it needs to modify odbcinst.ini system file. As an improvement, the location of the odbcinst.ini file can be changed so that, sudo is not requiered.
2017-05-23 22:57:10 +02:00
2017-07-14 20:05:23 +02:00
python3 run-perf_tests.py -platform < PLATFORM > -iterations < ITERATIONS > -iterations-large < ITERATIONS_LARGE > -result-server < RESULT_SERVER > -result-db < RESULT_DB > -result-uid < RESULT_UID > -result-pwd < RESULT_PWD >
2017-06-22 22:21:02 +02:00
2017-07-15 01:44:03 +02:00
`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WindowsServer2016 WindowsServer2012 Ubuntu16 RedHat7 Sierra
2017-06-22 22:21:02 +02:00
`-iterations` - The number of iterations for regular tests.
`-iterations-large` - The number of iterations for the tests that fetch large data. Usually set to 1.
`-result-server` - The server of result database. It is assumed that, the result database already setup before running the tests.
`-result-db` - Database name. With the current result database setup files, this should be set to `TestResults`
`-result-uid` - Result database username
`-result-pwd` Result database password
2017-05-23 22:57:10 +02:00
2017-05-19 03:17:00 +02:00