php-sqlsrv/test/Performance
2017-06-02 16:02:34 -07:00
..
benchmark Performance tests - initial commit 2017-05-05 17:32:09 -07:00
lib Update 2017-05-05 17:56:32 -07:00
compile_php.bat Windows setup working script 2017-06-01 17:35:44 -07:00
composer.json Adding json install files 2017-05-23 12:44:09 -07:00
phpbench.json Adding json install files 2017-05-23 12:44:09 -07:00
README.md Update README.md 2017-06-02 16:02:34 -07:00
run-perf_tests.py Initial commit for automation script to set up the environment and run the tests 2017-05-23 17:52:03 -07:00
setup_env_unix.sh Adding a workaround by installing svn, because the default svn on Mac is broken 2017-05-30 11:49:09 -07:00
setup_env_windows.ps1 Windows setup working script 2017-06-01 17:35:44 -07:00

Setup Environment on a clean machine

Windows

Install Visual Studio 2015 before running the following commands. Make sure C++ tools are enabled. Run cmd as administrator.

powershell
.\setup_env_windows.ps1 <LATEST PHP_VERSION - 7.x.x> <PHP_THREAD - ts or nts> <Absolute path to driver source folder> <ARCH - x86 or x64>    

Ubuntu 16

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>

RedHat 7

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>

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>

Run benchmarks - Subject to change once the process is automated

Run sqlsrv benchmarks:

./vendor/bin/phpbench run benchmark/sqlsrv/regular --time-unit="milliseconds" --iterations [num_of_iterations] --report=aggregate

Run pdo_sqlsrv benchmarks:

./vendor/bin/phpbench run benchmark/pdo_sqlsrv/regular --time-unit="milliseconds" --iterations [num_of_iterations] --report=aggregate

Run benchmarks that fetch large dataset. These benchmarks assume the database is already populated with data.

./vendor/bin/phpbench run benchmark/sqlsrv/large --time-unit="milliseconds" --report=aggregate
./vendor/bin/phpbench run benchmark/pdo_sqlsrv/large --time-unit="milliseconds" --report=aggregate