Skip to content

Commit 8d6a8c9

Browse files
Added env vars config file references on readme
1 parent 24bc3d3 commit 8d6a8c9

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

README.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -163,41 +163,41 @@ Prefer running in a container? We have a dedicated guide for building Docker ima
163163
plgm is configured primarily through its [config.yaml](./config.yaml) file. This makes it easier to save and version-control your test scenarios.
164164

165165
### Environment Variable Overrides
166-
You can override any setting in `config.yaml` using environment variables. This is useful for CI/CD pipelines, Kubernetes deployments, or quick runtime adjustments without editing the file. These are all the available ENV vars you can configure:
167-
168-
| Environment Variable | Description | Example |
169-
| :--- | :--- | :--- |
170-
| **Connection** | | |
171-
| `PERCONALOAD_URI` | Target MongoDB connection URI | `mongodb://user:pass@host:27017` |
172-
| `PERCONALOAD_DIRECT_CONNECTION` | Force direct connection (bypass topology discovery) | `true` |
173-
| `PERCONALOAD_REPLICA_SET` | Replica Set name (required for sharded clusters/RS) | `rs0` |
174-
| `PERCONALOAD_READ_PREFERENCE` | By default, an application directs its read operations to the primary member in a replica set. You can specify a read preference to send read operations to secondaries. | `nearest` |
175-
| `PERCONALOAD_USERNAME` | Database User | `admin` |
176-
| `PERCONALOAD_PASSWORD` | Database Password (if not set, plgm will prompt) | `password123` |
177-
| **Workload Control** | | |
178-
| `PERCONALOAD_CONCURRENCY` | Number of active worker goroutines | `50` |
179-
| `PERCONALOAD_DURATION` | Test duration (Go duration string) | `5m`, `60s` |
180-
| `PERCONALOAD_DEFAULT_WORKLOAD` | Use built-in "Flights" workload (`true`/`false`) | `false` |
181-
| `PERCONALOAD_COLLECTIONS_PATH` | Path to custom collection JSON files | `./schemas` |
182-
| `PERCONALOAD_QUERIES_PATH` | Path to custom query JSON files | `./queries` |
183-
| `PERCONALOAD_DOCUMENTS_COUNT` | Number of documents to seed initially | `10000` |
184-
| `PERCONALOAD_DROP_COLLECTIONS` | Drop collections before starting (`true`/`false`) | `true` |
185-
| `PERCONALOAD_SKIP_SEED` | Do not seed initial data on start (`true`/`false`) | `true` |
186-
| `PERCONALOAD_DEBUG_MODE` | Enable verbose debug logging (`true`/`false`) | `false` |
187-
| **Operation Ratios** | (Must sum to ~100) | |
188-
| `PERCONALOAD_FIND_PERCENT` | Percentage of Find operations | `55` |
189-
| `PERCONALOAD_INSERT_PERCENT` | Percentage of Insert operations | `20` |
190-
| `PERCONALOAD_UPDATE_PERCENT` | Percentage of Update operations | `10` |
191-
| `PERCONALOAD_DELETE_PERCENT` | Percentage of Delete operations | `10` |
192-
| `PERCONALOAD_AGGREGATE_PERCENT` | Percentage of Aggregate operations | `5` |
193-
| **Performance Optimization** | | |
194-
| `PERCONALOAD_FIND_BATCH_SIZE` | Documents returned per cursor batch | `100` |
195-
| `PERCONALOAD_FIND_LIMIT` | Hard limit on documents per Find query | `10` |
196-
| `PERCONALOAD_INSERT_CACHE_SIZE` | Size of the document generation buffer | `1000` |
197-
| `PERCONALOAD_OP_TIMEOUT_MS` | Soft timeout for individual DB operations (ms) | `500` |
198-
| `PERCONALOAD_RETRY_ATTEMPTS` | Number of retries for transient errors | `3` |
199-
| `PERCONALOAD_RETRY_BACKOFF_MS` | Wait time between retries (ms) | `10` |
200-
| `PERCONALOAD_STATUS_REFRESH_RATE_SEC` | How often to print stats to console (sec) | `5` |
166+
You can override any setting in `config.yaml` using environment variables. This is useful for CI/CD pipelines, Kubernetes deployments, or quick runtime adjustments without editing the file. These are all the available ENV vars you can configure and each corresponding setting in the [config.yaml](./config.yaml) file:
167+
168+
| Config Setting | Environment Variable | Description | Example |
169+
| :--- | :--- | :--- | :--- |
170+
| **Connection** | | | |
171+
| `uri` | `PERCONALOAD_URI` | Target MongoDB connection URI | `mongodb://user:pass@host:27017` |
172+
| `direct_connection` | `PERCONALOAD_DIRECT_CONNECTION` | Force direct connection (bypass topology discovery) | `true` |
173+
| `replicaset_name` | `PERCONALOAD_REPLICA_SET` | Replica Set name (required for sharded clusters/RS) | `rs0` |
174+
| `read_preference` | `PERCONALOAD_READ_PREFERENCE` | By default, an application directs its read operations to the primary member in a replica set. You can specify a read preference to send read operations to secondaries. | `nearest` |
175+
| `username` | `PERCONALOAD_USERNAME` | Database User | `admin` |
176+
| ***can not be set via config*** | `PERCONALOAD_PASSWORD` | Database Password (if not set, plgm will prompt) | `password123` |
177+
| **Workload Control** | | | |
178+
| `concurrency` | `PERCONALOAD_CONCURRENCY` | Number of active worker goroutines | `50` |
179+
| `duration` | `PERCONALOAD_DURATION` | Test duration (Go duration string) | `5m`, `60s` |
180+
| `default_workload` | `PERCONALOAD_DEFAULT_WORKLOAD` | Use built-in "Flights" workload (`true`/`false`) | `false` |
181+
| `collections_path` | `PERCONALOAD_COLLECTIONS_PATH` | Path to custom collection JSON files | `./schemas` |
182+
| `queries_path` | `PERCONALOAD_QUERIES_PATH` | Path to custom query JSON files | `./queries` |
183+
| `documents_count` | `PERCONALOAD_DOCUMENTS_COUNT` | Number of documents to seed initially | `10000` |
184+
| `drop_collections` | `PERCONALOAD_DROP_COLLECTIONS` | Drop collections before starting (`true`/`false`) | `true` |
185+
| `skip_seed` | `PERCONALOAD_SKIP_SEED` | Do not seed initial data on start (`true`/`false`) | `true` |
186+
| `debug_mode` | `PERCONALOAD_DEBUG_MODE` | Enable verbose debug logging (`true`/`false`) | `false` |
187+
| **Operation Ratios** | | (Must sum to ~100) | |
188+
| `find_percent` | `PERCONALOAD_FIND_PERCENT` | Percentage of Find operations | `55` |
189+
| `insert_percent` | `PERCONALOAD_INSERT_PERCENT` | Percentage of Insert operations (this is not related to the initial seed inserts) | `20` |
190+
| `update_percent` | `PERCONALOAD_UPDATE_PERCENT` | Percentage of Update operations | `10` |
191+
| `delete_percent` | `PERCONALOAD_DELETE_PERCENT` | Percentage of Delete operations | `10` |
192+
| `aggregate_percent` | `PERCONALOAD_AGGREGATE_PERCENT` | Percentage of Aggregate operations | `5` |
193+
| **Performance Optimization** | | | |
194+
| `find_batch_size` | `PERCONALOAD_FIND_BATCH_SIZE` | Documents returned per cursor batch | `100` |
195+
| `find_limit` | `PERCONALOAD_FIND_LIMIT` | Hard limit on documents per Find query | `10` |
196+
| `insert_cache_size` | `PERCONALOAD_INSERT_CACHE_SIZE` | Size of the document generation buffer | `1000` |
197+
| `op_timeout_ms` | `PERCONALOAD_OP_TIMEOUT_MS` | Soft timeout for individual DB operations (ms) | `500` |
198+
| `retry_attempts` | `PERCONALOAD_RETRY_ATTEMPTS` | Number of retries for transient errors | `3` |
199+
| `retry_backoff_ms` | `PERCONALOAD_RETRY_BACKOFF_MS` | Wait time between retries (ms) | `10` |
200+
| `status_refresh_rate_sec` | `PERCONALOAD_STATUS_REFRESH_RATE_SEC` | How often to print stats to console (sec) | `5` |
201201

202202

203203
**Example:**

0 commit comments

Comments
 (0)