Download the PHP package quillstack/benchmark without Composer
On this page you can find all versions of the php package quillstack/benchmark. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download quillstack/benchmark
More information about quillstack/benchmark
Files in quillstack/benchmark
Package benchmark
Short Description Bash/PHP script to benchmark HTTP requests and command line scripts.
License MIT
Homepage https://quillstack.com/benchmark
Informations about the package benchmark
Benchmark HTTP requests and command line calls
This repository contains a script to test HTTP GET requests or command line calls.
PHP usage
You can install this package using Composer:
In PHP console you can use this library by running commands:
List available commands
If you installed this library as a package in your project, you can run these commands:
List of available commands
HTTP GET requests
Command line calls
Cloned reposotiry
If you cloned this repository to your local computer, use these commands:
To see detailed descriptions for every command, ready Bash usage below.
Bash usage
You can also use Bash commands to run benchmarks. These commands work only if you clone this repository to your computer or server.
HTTP GET requests
Usage:
Where:
- 10 is a total number of requests
- 2 is a number of concurrent requests
Output:
What means we sent 10 GET requests to this host. We decided to send two requests at the time. The entire test took around 2.5 seconds. It means the website could server 4 requests per second with 0.5 seconds the average response time.
Command line calls
If you want to test command line calls, be sure every call respond with an execution time (in seconds):
For PHP the script could look like:
Usage example:
Output:
The results say we called the script 10 times with 2 concurrently calls. Our test took around 250 milliseconds, what means we could call this script 40 times per seconds, and average call time would be 1 millisecond.
Different results
You can have different results for different parameters. For example the results for the same script:
are different for these parameters:
Because we increased the number of concurrent calls.
If we use the same concurrent calls like in the first command line example:
The results should be similar to the first ones:
What gives use around 40 calls per second, if we have two concurrent calls.
Quill Stack
If you want to know more about other solutions, visit the website: \ https://quillstack.com/