From de5c9ebb3648b0059628e73ee6002da4e86f75d2 Mon Sep 17 00:00:00 2001 From: ulvii Date: Thu, 22 Jun 2017 13:21:02 -0700 Subject: [PATCH] Update README.md Updating Performance test readme file with instructions how to run the tests --- test/Performance/README.md | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/test/Performance/README.md b/test/Performance/README.md index 8faf63a8..151d2eb2 100644 --- a/test/Performance/README.md +++ b/test/Performance/README.md @@ -5,7 +5,10 @@ Install Visual Studio 2015 before running the following commands. Make sure C++ Run `cmd` as administrator. powershell - .\setup_env_windows.ps1 + Set-ExecutionPolicy Unrestricted + .\setup_env_windows.ps1 +If `PHP_VERSION` is wrong, the script will default it to the latest PHP 7.1 version + ### Ubuntu 16 sudo env “PATH=$PATH” bash setup_env_unix.sh Ubuntu16 ### RedHat 7 @@ -14,17 +17,21 @@ Run `cmd` as administrator. `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 -## Run benchmarks - Subject to change once the process is automated +## Run benchmarks -Run sqlsrv benchmarks: +### 1. Modify lib/connect.php with the test database credetials +### 2. Execute run-perf_tests.py. +The script must be executed with `sudo` 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. + + run-perf_tests.py -platform -iterations -iterations-large -result-server -result-db -result-uid -result-pwd + +`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WidnowsServer2016 WindowsServer2012 Ubuntu16 RedHat7 Sierra +`-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 - ./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