You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -182,8 +182,8 @@ You can override any setting in `config.yaml` using environment variables. This
182
182
|`concurrency`|`PERCONALOAD_CONCURRENCY`| Number of active worker goroutines |`50`|
183
183
|`duration`|`PERCONALOAD_DURATION`| Test duration (Go duration string) |`5m`, `60s`|
184
184
|`default_workload`|`PERCONALOAD_DEFAULT_WORKLOAD`| Use built-in "Flights" workload (`true`/`false`) |`false`|
185
-
|`collections_path`|`PERCONALOAD_COLLECTIONS_PATH`| Path to custom collection JSON files |`./schemas`|
186
-
|`queries_path`|`PERCONALOAD_QUERIES_PATH`| Path to custom query JSON files |`./queries`|
185
+
|`collections_path`|`PERCONALOAD_COLLECTIONS_PATH`| Path to custom collection JSON files (supports directories for multi-collection load) |`./schemas`|
186
+
|`queries_path`|`PERCONALOAD_QUERIES_PATH`| Path to custom query JSON files or directory. |`./queries`|
187
187
|`documents_count`|`PERCONALOAD_DOCUMENTS_COUNT`| Number of documents to seed initially |`10000`|
188
188
|`drop_collections`|`PERCONALOAD_DROP_COLLECTIONS`| Drop collections before starting (`true`/`false`) |`true`|
189
189
|`skip_seed`|`PERCONALOAD_SKIP_SEED`| Do not seed initial data on start (`true`/`false`) |`true`|
@@ -225,8 +225,9 @@ When executed, plgm performs the following steps:
225
225
* (Optional) Seeds initial data with the number of documents defined by `documents_count` in the config.
226
226
3.**Workload Execution:**
227
227
* Spawns the configured number of **Active Workers**.
228
-
* Continuously generates and executes queries (Find, Insert, Update, Delete, Aggregate) based on your configured ratios.
228
+
* Continuously generates and executes queries (Find, Insert, Update, Delete, Aggregate, Upsert) based on your configured ratios.
229
229
* Generates realistic BSON data for Inserts and Updates (supports recursion and complex schemas).
230
+
* Workers pick a random collection from the provided list for every operation.
230
231
4.**Reporting:**
231
232
* Outputs a real-time status report every N seconds (configurable).
232
233
* Prints a detailed summary table at the end of the run.
@@ -323,6 +324,14 @@ To run your own workload against your own schema:
323
324
"operation": "find",
324
325
"filter": { "customer_name": "<string>" },
325
326
"limit": 10
327
+
},
328
+
{
329
+
"database": "ecommerce",
330
+
"collection": "orders",
331
+
"operation": "updateOne",
332
+
"filter": { "order_uuid": "<string>" },
333
+
"update": { "$set": { "status": "processed" } },
334
+
"upsert": true
326
335
}
327
336
]
328
337
```
@@ -383,6 +392,7 @@ Please note:
383
392
* If there are no aggregation queries defined in queries.json, the aggregate_percent value is also ignored.
384
393
* Aggregate operations will only generate activity if at least one query with "operation": "aggregate" is defined in your active JSON query files.
385
394
* 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.
395
+
* 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.
386
396
387
397
388
398
#### Concurrency & Workers
@@ -413,6 +423,7 @@ These settings affect the efficiency of individual database operations and memor
413
423
***`insert_cache_size`**: The buffer size for the document generator channel.
414
424
**Tip:* This decouples document generation from database insertion. A larger buffer ensures workers rarely wait for data generation logic.
415
425
**Default:*`1000`
426
+
***`Upserts`**: Any updateOne or updateMany operation in your query JSON files can include "upsert": true. This will cause MongoDB to create the document if no match is found for the filter.
416
427
417
428
#### Timeouts & Reliability
418
429
Control how plgm reacts to network lag or database pressure.
0 commit comments