Skip to content

Commit d5af4c4

Browse files
authored
Rename env var prefix from PERCONALOAD_ to PLGM_. (#2)
This looks great, thank you.
1 parent d9acd0c commit d5af4c4

File tree

6 files changed

+155
-155
lines changed

6 files changed

+155
-155
lines changed

README.md

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -90,44 +90,44 @@ Flags:
9090

9191
Environment Variables (Overrides):
9292
[Connection]
93-
PERCONALOAD_URI Connection URI
94-
PERCONALOAD_USERNAME Database User
95-
PERCONALOAD_PASSWORD Database Password (Recommended: Use Prompt)
96-
PERCONALOAD_DIRECT_CONNECTION Force direct connection (true/false)
97-
PERCONALOAD_REPLICA_SET Replica Set name
98-
PERCONALOAD_READ_PREFERENCE nearest
93+
PLGM_URI Connection URI
94+
PLGM_USERNAME Database User
95+
PLGM_PASSWORD Database Password (Recommended: Use Prompt)
96+
PLGM_DIRECT_CONNECTION Force direct connection (true/false)
97+
PLGM_REPLICA_SET Replica Set name
98+
PLGM_READ_PREFERENCE nearest
9999

100100
[Workload Core]
101-
PERCONALOAD_DEFAULT_WORKLOAD Use built-in workload (true/false)
102-
PERCONALOAD_COLLECTIONS_PATH Path to collection JSON
103-
PERCONALOAD_QUERIES_PATH Path to query JSON
104-
PERCONALOAD_DURATION Test duration (e.g. 60s, 5m)
105-
PERCONALOAD_CONCURRENCY Number of active workers
106-
PERCONALOAD_DOCUMENTS_COUNT Initial seed document count
107-
PERCONALOAD_DROP_COLLECTIONS Drop collections on start (true/false)
108-
PERCONALOAD_SKIP_SEED Do not seed initial data on start (true/false)
109-
PERCONALOAD_DEBUG_MODE Enable verbose logic logs (true/false)
110-
PERCONALOAD_USE_TRANSACTIONS Enable transactional workloads (true/false)
111-
PERCONALOAD_MAX_TRANSACTION_OPS Maximum number of operations to group into a single transaction block
101+
PLGM_DEFAULT_WORKLOAD Use built-in workload (true/false)
102+
PLGM_COLLECTIONS_PATH Path to collection JSON
103+
PLGM_QUERIES_PATH Path to query JSON
104+
PLGM_DURATION Test duration (e.g. 60s, 5m)
105+
PLGM_CONCURRENCY Number of active workers
106+
PLGM_DOCUMENTS_COUNT Initial seed document count
107+
PLGM_DROP_COLLECTIONS Drop collections on start (true/false)
108+
PLGM_SKIP_SEED Do not seed initial data on start (true/false)
109+
PLGM_DEBUG_MODE Enable verbose logic logs (true/false)
110+
PLGM_USE_TRANSACTIONS Enable transactional workloads (true/false)
111+
PLGM_MAX_TRANSACTION_OPS Maximum number of operations to group into a single transaction block
112112

113113
[Operation Ratios] (Must sum to ~100)
114-
PERCONALOAD_FIND_PERCENT % of ops that are FIND
115-
PERCONALOAD_UPDATE_PERCENT % of ops that are UPDATE
116-
PERCONALOAD_INSERT_PERCENT % of ops that are INSERT
117-
PERCONALOAD_DELETE_PERCENT % of ops that are DELETE
118-
PERCONALOAD_AGGREGATE_PERCENT % of ops that are AGGREGATE
119-
PERCONALOAD_TRANSACTION_PERCENT % of ops that are TRANSACTIONAL
120-
PERCONALOAD_BULK_INSERT_PERCENT % of ops that are BULK INSERTS
114+
PLGM_FIND_PERCENT % of ops that are FIND
115+
PLGM_UPDATE_PERCENT % of ops that are UPDATE
116+
PLGM_INSERT_PERCENT % of ops that are INSERT
117+
PLGM_DELETE_PERCENT % of ops that are DELETE
118+
PLGM_AGGREGATE_PERCENT % of ops that are AGGREGATE
119+
PLGM_TRANSACTION_PERCENT % of ops that are TRANSACTIONAL
120+
PLGM_BULK_INSERT_PERCENT % of ops that are BULK INSERTS
121121

122122
[Performance Optimization]
123-
PERCONALOAD_FIND_BATCH_SIZE Docs returned per cursor batch
124-
PERCONALOAD_INSERT_BATCH_SIZE Number of docs in batch bulk insert
125-
PERCONALOAD_FIND_LIMIT Max docs per Find query
126-
PERCONALOAD_INSERT_CACHE_SIZE Generator buffer size
127-
PERCONALOAD_OP_TIMEOUT_MS Soft timeout per DB op (ms)
128-
PERCONALOAD_RETRY_ATTEMPTS Retry attempts for failures
129-
PERCONALOAD_RETRY_BACKOFF_MS Wait time between retries (ms)
130-
PERCONALOAD_STATUS_REFRESH_RATE_SEC Status report interval (sec)
123+
PLGM_FIND_BATCH_SIZE Docs returned per cursor batch
124+
PLGM_INSERT_BATCH_SIZE Number of docs in batch bulk insert
125+
PLGM_FIND_LIMIT Max docs per Find query
126+
PLGM_INSERT_CACHE_SIZE Generator buffer size
127+
PLGM_OP_TIMEOUT_MS Soft timeout per DB op (ms)
128+
PLGM_RETRY_ATTEMPTS Retry attempts for failures
129+
PLGM_RETRY_BACKOFF_MS Wait time between retries (ms)
130+
PLGM_STATUS_REFRESH_RATE_SEC Status report interval (sec)
131131
GOMAXPROCS Go Runtime CPU limit
132132
```
133133

@@ -174,46 +174,46 @@ You can override any setting in `config.yaml` using environment variables. This
174174
| Config Setting | Environment Variable | Description | Example |
175175
| :--- | :--- | :--- | :--- |
176176
| **Connection** | | | |
177-
| `uri` | `PERCONALOAD_URI` | Target MongoDB connection URI | `mongodb://user:pass@host:27017` |
178-
| `direct_connection` | `PERCONALOAD_DIRECT_CONNECTION` | Force direct connection (bypass topology discovery) | `true` |
179-
| `replicaset_name` | `PERCONALOAD_REPLICA_SET` | Replica Set name (required for sharded clusters/RS) | `rs0` |
180-
| `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` |
181-
| `username` | `PERCONALOAD_USERNAME` | Database User | `admin` |
182-
| ***can not be set via config*** | `PERCONALOAD_PASSWORD` | Database Password (if not set, plgm will prompt) | `password123` |
177+
| `uri` | `PLGM_URI` | Target MongoDB connection URI | `mongodb://user:pass@host:27017` |
178+
| `direct_connection` | `PLGM_DIRECT_CONNECTION` | Force direct connection (bypass topology discovery) | `true` |
179+
| `replicaset_name` | `PLGM_REPLICA_SET` | Replica Set name (required for sharded clusters/RS) | `rs0` |
180+
| `read_preference` | `PLGM_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` |
181+
| `username` | `PLGM_USERNAME` | Database User | `admin` |
182+
| ***can not be set via config*** | `PLGM_PASSWORD` | Database Password (if not set, plgm will prompt) | `password123` |
183183
| **Workload Control** | | | |
184-
| `concurrency` | `PERCONALOAD_CONCURRENCY` | Number of active worker goroutines | `50` |
185-
| `duration` | `PERCONALOAD_DURATION` | Test duration (Go duration string) | `5m`, `60s` |
186-
| `default_workload` | `PERCONALOAD_DEFAULT_WORKLOAD` | Use built-in "Flights" workload (`true`/`false`) | `false` |
187-
| `collections_path` | `PERCONALOAD_COLLECTIONS_PATH` | Path to custom collection JSON files (supports directories for multi-collection load) | `./schemas` |
188-
| `queries_path` | `PERCONALOAD_QUERIES_PATH` | Path to custom query JSON files or directory. | `./queries` |
189-
| `documents_count` | `PERCONALOAD_DOCUMENTS_COUNT` | Number of documents to seed initially | `10000` |
190-
| `drop_collections` | `PERCONALOAD_DROP_COLLECTIONS` | Drop collections before starting (`true`/`false`) | `true` |
191-
| `skip_seed` | `PERCONALOAD_SKIP_SEED` | Do not seed initial data on start (`true`/`false`) | `true` |
192-
| `debug_mode` | `PERCONALOAD_DEBUG_MODE` | Enable verbose debug logging (`true`/`false`) | `false` |
193-
| `use_transactions` | `PERCONALOAD_USE_TRANSACTIONS` | Enable Transactional Workloads (`true`/`false`) | `false` |
194-
| `max_transaction_ops` | `PERCONALOAD_MAX_TRANSACTION_OPS` | Maximum number of operations to group into a single transaction block | `5` |
184+
| `concurrency` | `PLGM_CONCURRENCY` | Number of active worker goroutines | `50` |
185+
| `duration` | `PLGM_DURATION` | Test duration (Go duration string) | `5m`, `60s` |
186+
| `default_workload` | `PLGM_DEFAULT_WORKLOAD` | Use built-in "Flights" workload (`true`/`false`) | `false` |
187+
| `collections_path` | `PLGM_COLLECTIONS_PATH` | Path to custom collection JSON files (supports directories for multi-collection load) | `./schemas` |
188+
| `queries_path` | `PLGM_QUERIES_PATH` | Path to custom query JSON files or directory. | `./queries` |
189+
| `documents_count` | `PLGM_DOCUMENTS_COUNT` | Number of documents to seed initially | `10000` |
190+
| `drop_collections` | `PLGM_DROP_COLLECTIONS` | Drop collections before starting (`true`/`false`) | `true` |
191+
| `skip_seed` | `PLGM_SKIP_SEED` | Do not seed initial data on start (`true`/`false`) | `true` |
192+
| `debug_mode` | `PLGM_DEBUG_MODE` | Enable verbose debug logging (`true`/`false`) | `false` |
193+
| `use_transactions` | `PLGM_USE_TRANSACTIONS` | Enable Transactional Workloads (`true`/`false`) | `false` |
194+
| `max_transaction_ops` | `PLGM_MAX_TRANSACTION_OPS` | Maximum number of operations to group into a single transaction block | `5` |
195195
| **Operation Ratios** | | (Must sum to ~100) | |
196-
| `find_percent` | `PERCONALOAD_FIND_PERCENT` | Percentage of Find operations | `50` |
197-
| `insert_percent` | `PERCONALOAD_INSERT_PERCENT` | Percentage of Insert operations (this is not related to the initial seed inserts) | `10` |
198-
| `bulk_insert_percent ` | `PERCONALOAD_BULK_INSERT_PERCENT` | Percentage of Bulk Insert operations (this is not related to the initial seed inserts) | `10` |
199-
| `update_percent` | `PERCONALOAD_UPDATE_PERCENT` | Percentage of Update operations | `10` |
200-
| `delete_percent` | `PERCONALOAD_DELETE_PERCENT` | Percentage of Delete operations | `10` |
201-
| `aggregate_percent` | `PERCONALOAD_AGGREGATE_PERCENT` | Percentage of Aggregate operations | `5` |
202-
| `transaction_percent` | `PERCONALOAD_TRANSACTION_PERCENT` | Percentage of Transactional operations | `5` |
196+
| `find_percent` | `PLGM_FIND_PERCENT` | Percentage of Find operations | `50` |
197+
| `insert_percent` | `PLGM_INSERT_PERCENT` | Percentage of Insert operations (this is not related to the initial seed inserts) | `10` |
198+
| `bulk_insert_percent ` | `PLGM_BULK_INSERT_PERCENT` | Percentage of Bulk Insert operations (this is not related to the initial seed inserts) | `10` |
199+
| `update_percent` | `PLGM_UPDATE_PERCENT` | Percentage of Update operations | `10` |
200+
| `delete_percent` | `PLGM_DELETE_PERCENT` | Percentage of Delete operations | `10` |
201+
| `aggregate_percent` | `PLGM_AGGREGATE_PERCENT` | Percentage of Aggregate operations | `5` |
202+
| `transaction_percent` | `PLGM_TRANSACTION_PERCENT` | Percentage of Transactional operations | `5` |
203203
| **Performance Optimization** | | | |
204-
| `find_batch_size` | `PERCONALOAD_FIND_BATCH_SIZE` | Documents returned per cursor batch | `100` |
205-
| `insert_batch_size` | `PERCONALOAD_INSERT_BATCH_SIZE` | Number of documents per insert batch | `100` |
206-
| `find_limit` | `PERCONALOAD_FIND_LIMIT` | Hard limit on documents per Find query | `10` |
207-
| `insert_cache_size` | `PERCONALOAD_INSERT_CACHE_SIZE` | Size of the document generation buffer | `1000` |
208-
| `op_timeout_ms` | `PERCONALOAD_OP_TIMEOUT_MS` | Soft timeout for individual DB operations (ms) | `500` |
209-
| `retry_attempts` | `PERCONALOAD_RETRY_ATTEMPTS` | Number of retries for transient errors | `3` |
210-
| `retry_backoff_ms` | `PERCONALOAD_RETRY_BACKOFF_MS` | Wait time between retries (ms) | `10` |
211-
| `status_refresh_rate_sec` | `PERCONALOAD_STATUS_REFRESH_RATE_SEC` | How often to print stats to console (sec) | `5` |
204+
| `find_batch_size` | `PLGM_FIND_BATCH_SIZE` | Documents returned per cursor batch | `100` |
205+
| `insert_batch_size` | `PLGM_INSERT_BATCH_SIZE` | Number of documents per insert batch | `100` |
206+
| `find_limit` | `PLGM_FIND_LIMIT` | Hard limit on documents per Find query | `10` |
207+
| `insert_cache_size` | `PLGM_INSERT_CACHE_SIZE` | Size of the document generation buffer | `1000` |
208+
| `op_timeout_ms` | `PLGM_OP_TIMEOUT_MS` | Soft timeout for individual DB operations (ms) | `500` |
209+
| `retry_attempts` | `PLGM_RETRY_ATTEMPTS` | Number of retries for transient errors | `3` |
210+
| `retry_backoff_ms` | `PLGM_RETRY_BACKOFF_MS` | Wait time between retries (ms) | `10` |
211+
| `status_refresh_rate_sec` | `PLGM_STATUS_REFRESH_RATE_SEC` | How often to print stats to console (sec) | `5` |
212212

213213

214214
**Example:**
215215
```bash
216-
PERCONALOAD_CONCURRENCY=50 PERCONALOAD_DURATION=5m ./bin/plgm
216+
PLGM_CONCURRENCY=50 PLGM_DURATION=5m ./bin/plgm
217217
```
218218

219219
---
@@ -291,7 +291,7 @@ What this represents:
291291
* Avg Rate (Ops/Sec): The total throughput of the database cluster. It is calculated by dividing Total Ops by the total Runtime.
292292
* AVG Latency: The average time (in milliseconds) it took the MongoDB driver to receive a response for that operation.
293293
* P95/P99 (Percentiles): These are the most critical metrics for performance tuning. P99 represents the "worst-case" scenario for 99% of your users. For example, if P99 SELECT is 9.00ms, it means 99% of your flight searches completed in under 9ms, while 1% took longer.
294-
* TRANS Latency: This will typically be higher than individual operations because a single transaction block contains 1 to X grouped operations, where X is defined in the config file via `max_transaction_ops` or the env var `PERCONALOAD_MAX_TRANSACTION_OPS`.
294+
* TRANS Latency: This will typically be higher than individual operations because a single transaction block contains 1 to X grouped operations, where X is defined in the config file via `max_transaction_ops` or the env var `PLGM_MAX_TRANSACTION_OPS`.
295295

296296
---
297297

@@ -342,8 +342,8 @@ To run your own workload against your own schema:
342342

343343
3. **Run:**
344344
```bash
345-
export PERCONALOAD_COLLECTIONS_PATH=./my_collection.json
346-
export PERCONALOAD_QUERIES_PATH=./my_queries.json
345+
export PLGM_COLLECTIONS_PATH=./my_collection.json
346+
export PLGM_QUERIES_PATH=./my_queries.json
347347
./bin/plgm
348348
```
349349

@@ -396,7 +396,7 @@ Please note:
396396
* If `use_transactions: false`, the transaction_percent value is ignored.
397397
* If there are no aggregation queries defined in queries.json, the aggregate_percent value is also ignored.
398398
* Aggregate operations will only generate activity if at least one query with "operation": "aggregate" is defined in your active JSON query files.
399-
* The maximum number of operations within a transaction is defined in the config file via `max_transaction_ops` or the env var `PERCONALOAD_MAX_TRANSACTION_OPS`. The number of operations per transaction will be randomized, with the max number being set as explained above.
399+
* The maximum number of operations within a transaction is defined in the config file via `max_transaction_ops` or the env var `PLGM_MAX_TRANSACTION_OPS`. The number of operations per transaction will be randomized, with the max number being set as explained above.
400400
* Multi-Collection Load: If multiple collections are defined in your collections_path, each worker will randomly select a collection for every operation. This includes operations within a transaction, allowing for cross-collection atomic updates.
401401

402402

0 commit comments

Comments
 (0)