Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ node_modules/
/playwright-report/
/blob-report/
/playwright/.cache/
/logs*
# /logs*
.env*
12 changes: 12 additions & 0 deletions apps/tasks-3.x/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"packages": {
"mongo": {
"reactivity": {
"eventEmitter": false,
"changeStreams": false,
"oplog": false,
"pooling": true
}
}
}
}
15 changes: 15 additions & 0 deletions artillery/reactive-stress-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
config:
target: ws://localhost:3000/websocket
phases:
- duration: 60
arrivalRate: 15
ensure:
maxErrorRate: 1
max: 500
processor: '../tests/server-load-helpers.js'
scenarios:
- name: Measure Task Latency (3.x)
flow:
- function: 'beforeScenario'
- function: 'reactivePubSubTasksDdp'
- function: 'afterScenario'
7 changes: 4 additions & 3 deletions artillery/reactive-stress.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
config:
target: http://localhost:3000
phases:
- duration: 60
arrivalRate: 4
- duration: 30
arrivalRate: 2
name: Warm up
ensure:
maxErrorRate: 1
max: 500
# Load the Playwright engine:
engines:
playwright:
headless: true
globalTimeout: 240000
launchOptions:
slowMo: 500
# Path to JavaScript file that defines Playwright test functions
processor: '../tests/test-helpers.js'
scenarios:
- engine: playwright
testFunction: 'reactiveAddAndRemoveTasks'
testFunction: 'reactiveAddAndRemoveTasksWithCleanup'
325 changes: 325 additions & 0 deletions logs/changeStreams.log

Large diffs are not rendered by default.

325 changes: 325 additions & 0 deletions logs/events.log

Large diffs are not rendered by default.

325 changes: 325 additions & 0 deletions logs/oplog.log

Large diffs are not rendered by default.

325 changes: 325 additions & 0 deletions logs/pooling.log

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions logs/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# MongoDB Resource Usage Results

## 🔥 CPU (%) – REPLICAS

| **Scenario** | **REPLICA_localhost_27017** | **REPLICA_localhost_27018** | **REPLICA_localhost_27019** |
|---------------------|-----------------------------|-----------------------------|-----------------------------|
| **Oplog** | 30.37 | 30.37 | **51.44** |
| **Events** | 20.42 | 20.58 | 38.09 |
| **Pooling** | 19.02 | 19.10 | 31.39 |
| **Change Streams** | 15.00 | 15.28 | 31.15 |

---

## 💾 Memory (MB) – REPLICAS

| **Scenario** | **REPLICA_localhost_27017** | **REPLICA_localhost_27018** | **REPLICA_localhost_27019** |
|---------------------|-----------------------------|-----------------------------|-----------------------------|
| **Pooling** | 384 | 386 | 399 |
| **Change Streams** | 370 | 374 | 386 |
| **Events** | 378 | 387 | **402** |
| **Oplog** | 355 | 355 | 340 |
---

## 🔥 CPU (%) – APP

| **Scenario** | **APP** |
|---------------------|---------|
| **Oplog** | **54.58** |
| **Events** | 43.07 |
| **Change Streams** | 42.85 |
| **Pooling** | 36.52 |

---

## 💾 Memory (MB) – APP

| **Scenario** | **APP** |
|---------------------|---------|
| **Change Streams** | **422** |
| **Oplog** | 360 |
| **Events** | 379 |
| **Pooling** | 355 |
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"name": "performance",
"version": "1.0.0",
"main": "index.js",
"scripts": {},
"scripts": {
"stress:ddp": "NODE_OPTIONS=\"--no-deprecation\" artillery run artillery/reactive-stress-server.yml"
},
"author": "",
"license": "ISC",
"description": "",
Expand All @@ -16,7 +18,8 @@
"artillery": "^2.0.17",
"m": "^1.9.0",
"minimist": "^1.2.8",
"pidusage": "^3.0.2"
"pidusage": "^3.0.2",
"mongodb": "^6.8.0"
},
"volta": {
"node": "20.16.0"
Expand Down
Loading