php-sqlsrv/test/Performance
2017-06-20 17:40:54 -07:00
..
benchmark Update SqlsrvInsertBench.php 2017-06-02 16:46:03 -07:00
lib 1. Modifying Sqlsrv benchmarks to use sqlsrv_fetch_array to make the fetch consistent with PDO_SQLSRV. 2. Modifying PDO_SQLSRV benchmarks to use exec() instead of query() 2017-06-05 17:04:57 -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 Report duration in seconds 2017-06-20 17:40:54 -07:00
setup_env_unix.sh Adding pyodbc install instructions to setup scripts 2017-06-19 14:32:24 -07:00
setup_env_windows.ps1 Adding pyodbc install instructions to setup scripts 2017-06-19 14:32:24 -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