From faf14547a29474b5a9be4de8138a600ad653cd86 Mon Sep 17 00:00:00 2001 From: ulvii Date: Tue, 23 May 2017 13:57:10 -0700 Subject: [PATCH] Update README.md Adding a few more instructions to run the benchmarks --- test/Performance/README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/Performance/README.md b/test/Performance/README.md index c5c251d9..739e0d1d 100644 --- a/test/Performance/README.md +++ b/test/Performance/README.md @@ -10,12 +10,28 @@ Download and run Composer-Setup.exe https://getcomposer.org/Composer-Setup.exe php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');" + mv composer.phar /usr/local/bin/composer -## 2. Install PHPBench +## 2. Install PHPBench - A Benchmark Runner for PHP +http://phpbench.readthedocs.io/en/latest/ + +Make sure git is installed and in your PATH env. Navigate into Performance folder and run: composer install ## 3. Run benchmarks - ./vendor/bin/phpbench run benchmark/ --time-unit="milliseconds" --report=aggregate +PHPBench will use the default PHP in PATH env. To specify a different PHP binary, use `--php-binary path_to_php`. Make sure `sqlsrv` and `pdo_sqlsrv` are loaded. Edit `lib/connect.php` with connection credentials. Run benchmarks. + +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