Update README.md
This commit is contained in:
parent
ee8571e8ea
commit
a584a098f5
25
README.md
25
README.md
|
@ -1,25 +1,25 @@
|
||||||
<!-- #build0 -->
|
<!-- #build0 -->
|
||||||
# bench plugin
|
# bench plugin
|
||||||
|
|
||||||
### Docker Run
|
## Docker Run
|
||||||
|
|
||||||
Run the Docker image using the `docker run` command. Here are examples adjusted for the new environment variables:
|
Run the Docker image using the `docker run` command, now including the `CMS_TYPE` environment variable for CMS-specific authentication:
|
||||||
|
|
||||||
1. **Testing a Single URL:**
|
1. **Testing a Single URL with Concrete5 Authentication:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -e URLS="http://example.com" -e USERNAME="user" -e PASSWORD="pass" git.nixc.us/colin/bench:production
|
docker run -e CMS_TYPE="Concrete5" -e URLS="http://example.com" -e USERNAME="user" -e PASSWORD="pass" git.nixc.us/colin/bench:production
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Testing Multiple URLs:**
|
2. **Testing Multiple URLs with Concrete5 Authentication:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -e URLS="http://example.com,http://example2.com" -e USERNAME="user" -e PASSWORD="pass" git.nixc.us/colin/bench:production
|
docker run -e CMS_TYPE="Concrete5" -e URLS="http://example.com,http://example2.com" -e USERNAME="user" -e PASSWORD="pass" git.nixc.us/colin/bench:production
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
|
|
||||||
Example `docker-compose.yml` file adjusted for the new script:
|
Example `docker-compose.yml` file, now with `CMS_TYPE` to specify the CMS for authentication:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '3'
|
version: '3'
|
||||||
|
@ -28,12 +28,12 @@ services:
|
||||||
apachebench:
|
apachebench:
|
||||||
image: git.nixc.us/colin/bench:production
|
image: git.nixc.us/colin/bench:production
|
||||||
environment:
|
environment:
|
||||||
|
CMS_TYPE: "Concrete5" # Specify CMS type for authentication
|
||||||
URLS: "http://example.com,http://example2.com" # Comma-separated list of URLs
|
URLS: "http://example.com,http://example2.com" # Comma-separated list of URLs
|
||||||
USERNAME: "user" # Basic auth username
|
USERNAME: "user" # Basic auth username
|
||||||
PASSWORD: "pass" # Basic auth password
|
PASSWORD: "pass" # Basic auth password
|
||||||
REQUESTS: 100 # Number of requests for Apache Bench
|
REQUESTS: 100 # Number of requests for Apache Bench
|
||||||
CONCURRENCY: 10 # Number of multiple requests to make at a time
|
CONCURRENCY: 10 # Number of multiple requests to make at a time
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Run the service defined in the `docker-compose.yml` file with:
|
Run the service defined in the `docker-compose.yml` file with:
|
||||||
|
@ -42,13 +42,12 @@ Run the service defined in the `docker-compose.yml` file with:
|
||||||
docker-compose up
|
docker-compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
### Customizing the Configuration
|
## Customizing the Configuration
|
||||||
|
|
||||||
Adjust the `URLS`, `USERNAME`, `PASSWORD`, `REQUESTS`, and `CONCURRENCY` environment variables to meet your testing needs. Here's the purpose of each:
|
To fine-tune your testing setup, adjust the following environment variables:
|
||||||
|
|
||||||
|
- `CMS_TYPE`: Specify the CMS type for CMS-specific authentication (e.g., "Concrete5").
|
||||||
- `URLS`: Comma-separated list of URLs to test.
|
- `URLS`: Comma-separated list of URLs to test.
|
||||||
- `USERNAME` and `PASSWORD`: Credentials for HTTP Basic Authentication.
|
- `USERNAME` and `PASSWORD`: Credentials for HTTP Basic Authentication.
|
||||||
- `REQUESTS`: Number of requests to perform with Apache Bench.
|
- `REQUESTS`: Number of requests to perform with Apache Bench.
|
||||||
- `CONCURRENCY`: Number of multiple requests to make at a time.
|
- `CONCURRENCY`: Number of multiple requests to make at a time.
|
||||||
|
|
||||||
This setup allows you to run authenticated performance tests in a Docker environment, offering an automated approach to benchmarking and analyzing the performance of web services.
|
|
Loading…
Reference in New Issue