add n8n-mcp Benchmarks (customSmallerIsBetter) benchmark result for 0d2d9bdd52

This commit is contained in:
github-action-benchmark
2025-10-18 20:13:18 +00:00
parent 54a1ad5f79
commit 190c154f35

View File

@@ -1,60 +1,8 @@
window.BENCHMARK_DATA = {
"lastUpdate": 1760812460909,
"lastUpdate": 1760818398508,
"repoUrl": "https://github.com/czlonkowski/n8n-mcp",
"entries": {
"n8n-mcp Benchmarks": [
{
"commit": {
"author": {
"email": "56956555+czlonkowski@users.noreply.github.com",
"name": "Romuald Członkowski",
"username": "czlonkowski"
},
"committer": {
"email": "noreply@github.com",
"name": "GitHub",
"username": "web-flow"
},
"distinct": true,
"id": "f4dff6b8e12d1fe24d5cd5cb733b6842847252e5",
"message": "Merge pull request #243 from czlonkowski/feature/execution-data-filtering\n\nfeat: Intelligent Execution Data Filtering for n8n_get_execution Tool",
"timestamp": "2025-10-01T00:21:57+02:00",
"tree_id": "cabfa56be93a0a16e54e26a8fe67f8750eecde96",
"url": "https://github.com/czlonkowski/n8n-mcp/commit/f4dff6b8e12d1fe24d5cd5cb733b6842847252e5"
},
"date": 1759271030160,
"tool": "customSmallerIsBetter",
"benches": [
{
"name": "sample - array sorting - small",
"value": 0.0193,
"range": "0.2752",
"unit": "ms",
"extra": "51703 ops/sec"
},
{
"name": "sample - array sorting - large",
"value": 3.1648,
"range": "0.46229999999999993",
"unit": "ms",
"extra": "316 ops/sec"
},
{
"name": "sample - string concatenation",
"value": 0.005,
"range": "0.2929",
"unit": "ms",
"extra": "199387 ops/sec"
},
{
"name": "sample - object creation",
"value": 0.0663,
"range": "0.3821",
"unit": "ms",
"extra": "15093 ops/sec"
}
]
},
{
"commit": {
"author": {
@@ -2140,6 +2088,37 @@ window.BENCHMARK_DATA = {
"extra": "73341 ops/sec"
}
]
},
{
"commit": {
"author": {
"email": "56956555+czlonkowski@users.noreply.github.com",
"name": "Romuald Członkowski",
"username": "czlonkowski"
},
"committer": {
"email": "noreply@github.com",
"name": "GitHub",
"username": "web-flow"
},
"distinct": true,
"id": "0d2d9bdd523208b44c154264a693fc1a026722cc",
"message": "fix: Critical memory leak in sql.js adapter (fixes #330) (#335)\n\n* fix: Critical memory leak in sql.js adapter (fixes #330)\n\nResolves critical memory leak causing growth from 100Mi to 2.2GB over 72 hours in Docker/Kubernetes deployments.\n\nProblem Analysis:\n- Environment: Kubernetes/Docker using sql.js fallback\n- Growth rate: ~23 MB/hour (444Mi after 19 hours)\n- Pattern: Linear accumulation, garbage collection couldn't keep pace\n- Impact: OOM kills every 24-48 hours in memory-limited pods\n\nRoot Causes:\n1. Over-aggressive save triggering: prepare() called scheduleSave() on reads\n2. Too frequent saves: 100ms debounce = 3-5 saves/second under load\n3. Double allocation: Buffer.from() copied Uint8Array (4-10MB per save)\n4. No cleanup: Relied solely on GC which couldn't keep pace\n5. Docker limitation: Missing build tools forced sql.js instead of better-sqlite3\n\nCode-Level Fixes (sql.js optimization):\n✅ Removed scheduleSave() from prepare() (read operations don't modify DB)\n✅ Increased debounce: 100ms → 5000ms (98% reduction in save frequency)\n✅ Removed Buffer.from() copy (50% reduction in temporary allocations)\n✅ Made save interval configurable via SQLJS_SAVE_INTERVAL_MS env var\n✅ Added input validation (minimum 100ms, falls back to 5000ms default)\n\nInfrastructure Fix (Dockerfile):\n✅ Added build tools (python3, make, g++) to main Dockerfile\n✅ Compile better-sqlite3 during npm install, then remove build tools\n✅ Image size increase: ~5-10MB (acceptable for eliminating memory leak)\n✅ Railway Dockerfile already had build tools (added explanatory comment)\n\nImpact:\nWith better-sqlite3 (now default in Docker):\n- Memory: Stable at ~100-120 MB (native SQLite)\n- Performance: Better than sql.js (no WASM overhead)\n- No periodic saves needed (writes directly to disk)\n- Eliminates memory leak entirely\n\nWith sql.js (fallback only):\n- Memory: Stable at 150-200 MB (vs 2.2GB after 3 days)\n- No OOM kills in long-running Kubernetes pods\n- Reduced CPU usage (98% fewer disk writes)\n- Same data safety (5-second save window acceptable)\n\nConfiguration:\n- New env var: SQLJS_SAVE_INTERVAL_MS (default: 5000)\n- Only relevant when sql.js fallback is used\n- Minimum: 100ms, invalid values fall back to default\n\nTesting:\n✅ All unit tests passing\n✅ New integration tests for memory leak prevention\n✅ TypeScript compilation successful\n✅ Docker builds verified (build tools working)\n\nFiles Modified:\n- src/database/database-adapter.ts: SQLJSAdapter optimization\n- Dockerfile: Added build tools for better-sqlite3\n- Dockerfile.railway: Added documentation comment\n- tests/unit/database/database-adapter-unit.test.ts: New test suites\n- tests/integration/database/sqljs-memory-leak.test.ts: Integration tests\n- package.json: Version bump to 2.20.2\n- package.runtime.json: Version bump to 2.20.2\n- CHANGELOG.md: Comprehensive v2.20.2 entry\n- README.md: Database & Memory Configuration section\n\nCloses #330\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\n\n* fix: Address code review findings for memory leak fix (#330)\n\n## Code Review Fixes\n\n1. **Test Assertion Error (line 292)** - CRITICAL\n - Fixed incorrect assertion in sqljs-memory-leak test\n - Changed from `expect(saveCallback).toBeLessThan(10)`\n - To: `expect(saveCallback.mock.calls.length).toBeLessThan(10)`\n - ✅ Test now passes (12/12 tests passing)\n\n2. **Upper Bound Validation**\n - Added maximum value validation for SQLJS_SAVE_INTERVAL_MS\n - Valid range: 100ms - 60000ms (1 minute)\n - Falls back to default 5000ms if out of range\n - Location: database-adapter.ts:255\n\n3. **Railway Dockerfile Optimization**\n - Removed build tools after installing dependencies\n - Reduces image size by ~50-100MB\n - Pattern: install → build native modules → remove tools\n - Location: Dockerfile.railway:38-41\n\n4. **Defensive Programming**\n - Added `closed` flag to prevent double-close issues\n - Early return if already closed\n - Location: database-adapter.ts:236, 283-286\n\n5. **Documentation Improvements**\n - Added comprehensive comments for DEFAULT_SAVE_INTERVAL_MS\n - Documented data loss window trade-off (5 seconds)\n - Explained constructor optimization (no initial save)\n - Clarified scheduleSave() debouncing under load\n\n6. **CHANGELOG Accuracy**\n - Fixed discrepancy about explicit cleanup\n - Updated to reflect automatic cleanup via function scope\n - Removed misleading `data = null` reference\n\n## Verification\n\n- ✅ Build: Success\n- ✅ Lint: No errors\n- ✅ Critical test: sqljs-memory-leak (12/12 passing)\n- ✅ All code review findings addressed\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\n\n---------\n\nCo-authored-by: Claude <noreply@anthropic.com>",
"timestamp": "2025-10-18T22:11:27+02:00",
"tree_id": "f8c03f5cd1a539bfaf9575a9caba3424599d1c0b",
"url": "https://github.com/czlonkowski/n8n-mcp/commit/0d2d9bdd523208b44c154264a693fc1a026722cc"
},
"date": 1760818398133,
"tool": "customSmallerIsBetter",
"benches": [
{
"name": "sample - array sorting - small",
"value": 0.0136,
"range": "0.3096",
"unit": "ms",
"extra": "73341 ops/sec"
}
]
}
]
}