Files
wekan/package.json
T
Lauri Ojansivu 1c636f09b3 CPU-usage monitor + governor + Admin Panel / Problems / CPU usage report
WeKan and FerretDB on one machine can drive CPU high enough to starve other
software. Add a monitor, a governor, and a report. Design: docs/Features/CPU/CPU.md.

Monitor (server/lib/cpuMonitor.js): samples system-wide CPU% from os.cpus()
idle/total deltas on an interval (so it includes WeKan, FerretDB and every other
process). A pure, hysteresis state machine (models/lib/cpuHighTracker.js) turns
the samples into ONLY the START and END of each sustained high-CPU period — two
rows per episode, never a flood. Enters high after 3 consecutive samples >= 85%,
leaves after 3 consecutive < 70%. Each row carries duration, peak, system load,
and what WeKan was doing (setActivity label). Recorded to a new 'cpu' event
stream (server/lib/cpuLog.js).

Governor: cpuMonitor exports isHighCpu() and pauseIfBusy(), so long batch
operations await a short pause and yield the CPU only while the system is busy
(no cost when idle). Wired into the existing-file extension corrector. Tunable
via WEKAN_CPU_* env vars.

Report: 'cpu' added to EVENT_STREAMS; reuses the generic eventStreamReport
(stream="cpu") with search + pagination; a "CPU usage" item is added to the
Admin Panel / Problems side menu (cpuReportTitle i18n).

Tests: cpuHighTracker unit (start/end, duration/peak, no-flap hysteresis;
positive + negative) and cpuMonitorWiring source guards. CHANGELOG + design doc.
2026-07-20 03:11:07 +03:00

111 lines
8.0 KiB
JSON

{
"name": "wekan",
"version": "v10.03.0",
"description": "Open-Source kanban",
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/wekan/wekan.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/wekan/wekan/issues"
},
"homepage": "https://wekan.fi",
"meteor": {
"mainModule": {
"client": "client/main.js",
"server": "server/main.js"
},
"testModule": {
"client": "client/lib/tests/index.js",
"server": "server/lib/tests/index.js"
},
"modern": true
},
"scripts": {
"test": "meteor test --once --driver-package meteortesting:mocha",
"test:unit:node": "node tests/filenameSanitizer.test.cjs && node tests/cardBoardConsistency.test.cjs && node tests/cardUrl.test.cjs && node tests/defaultSwimlane.test.cjs && node tests/cardMoveModifier.test.cjs && node tests/authenticationMethod.test.cjs && node tests/linkedCardTarget.test.cjs && node tests/staleWhileRevalidate.test.cjs && node tests/restArrayParam.test.cjs && node tests/minicardLabelHeight.test.cjs && node tests/dateUtils.normalizeDigits.test.cjs && node tests/reconcileBoardTeamMembers.test.cjs && node tests/rulesBoardSelector.test.cjs && node tests/ruleActionResolve.test.cjs && node tests/boardBackground.test.cjs && node tests/weekStart.test.cjs && node tests/ldapUsernameSlug.test.cjs && node tests/ldapGroupAllowlist.test.cjs && node tests/ldapConnectionRelease.test.cjs && node tests/htmljsArrayContent.test.cjs && node tests/cardDescriptionDraft.test.cjs && node tests/commentDraft.test.cjs && node tests/attachmentDeleteGuard.test.cjs && node tests/ruleMoveAction.test.cjs && node tests/snapMigrationRecovery.test.cjs && node tests/migrationAttachmentExtraction.test.cjs && node tests/attachmentRepair.test.cjs && node tests/attachmentStoragePath.test.cjs && node tests/schemaUpgradeSteps.test.cjs && node tests/cpuExec.test.cjs && node tests/cpuExecWiring.test.cjs && node tests/ferretdbHasData.test.cjs && node tests/ferretdbPolling.test.cjs && node tests/ferretdbWaitTimeout.test.cjs && node tests/ferretdbOplog.test.cjs && node tests/adminReportsPagination.test.cjs && node tests/fileNameDisplay.test.cjs && node tests/uploadFileName.test.cjs && node tests/diskSpace.test.cjs && node tests/fileTypeCorrection.test.cjs && node tests/fileHardeningGuards.test.cjs && node tests/cpuHighTracker.test.cjs && node tests/cpuMonitorWiring.test.cjs && node tests/buttonThemeColors.test.cjs && node tests/uiDensity.test.cjs && node tests/editorSubmitKey.test.cjs && node tests/isoWeek.test.cjs && node tests/boardCopyDefaults.test.cjs && node tests/linkedCardTitle.test.cjs && node tests/commentActivity.test.cjs && node tests/swimlaneSort.test.cjs && node tests/subtaskCopy.test.cjs && node tests/subtasksDefaultBoard.test.cjs && node tests/scrollbarCss.test.cjs && node tests/minicardBidiIsolation.test.cjs && node tests/notificationCleanup.test.cjs && node tests/cardSearch.test.cjs && node tests/linkedCardMembers.test.cjs && node tests/verificationEmail.test.cjs && node tests/boardSortReorder.test.cjs && node tests/checklistItemTitles.test.cjs && node tests/swimlaneFilter.test.cjs && node tests/popupOffset.test.cjs && node tests/popupAfterConfirm.test.cjs && node tests/defaultBoard.test.cjs && node tests/upcomingUiGuards.test.cjs && node tests/linkedCardCover.test.cjs && node tests/inviteEmailLanguage.test.cjs && node tests/domainTablePage.test.cjs && node tests/mongoSelectorSafety.test.cjs && node tests/filterDateNull.test.cjs && node tests/listMoveSwimlane.test.cjs && node tests/cardDragSwimlaneScrollRefresh.test.cjs && node tests/undoRedoSelection.test.cjs && node tests/softDelete.test.cjs && node tests/globalThemeColor.test.cjs && node tests/themeCategories.test.cjs && node tests/themeColorPicker.test.cjs && node tests/uiFonts.test.cjs && node tests/sandstormAutoOpen.test.cjs && node tests/createListParams.test.cjs && node tests/addBoardTileHeight.test.cjs && node tests/multiSelectionButton.test.cjs && node tests/headerHamburger.test.cjs && node tests/changeLanguageColumns.test.cjs && node tests/cardsLoading.test.cjs && node tests/base64Chunk.test.cjs && node tests/backupPaths.test.cjs && node tests/backupCron.test.cjs && node tests/avatarUrlSafety.test.cjs && node tests/importedUserReconciliationPlan.test.cjs && node tests/ldapPhoto.test.cjs && node tests/importedBoardMemberPlan.test.cjs && node tests/migrateNonFinite.test.cjs && node tests/addListComposerOptions.test.cjs && node tests/sidebarWidth.test.cjs && node tests/sidebarResize.test.cjs && node tests/securityMeifukun.test.cjs && node tests/securityLog.test.cjs && node tests/exporterBackpressure.test.cjs && node tests/ldapEmailFieldmap.test.cjs && node tests/unit/resetPasswordEmail.test.js",
"test:unit:all": "npm run test:unit:node && node tests/cards.stickers.test.js && node tests/stickers.test.js && node tests/stickers.packs.test.js && node tests/linkCardPopup.test.js && node tests/trelloCreator.import.test.js && node tests/trelloImport.maplink.test.js && node tests/trelloImport.zip.test.js && node tests/wekanCreator.import.test.js && node tests/wekanCreator.inconsistent.test.js && node tests/unit/oauth2-admin-groups.test.js",
"test:watch": "meteor test --driver-package meteortesting:mocha",
"test:e2e": "node tests/e2e/list-regressions.js",
"test:playwright": "cd tests/playwright && npm install && npx playwright test",
"test:playwright:ui": "cd tests/playwright && npx playwright test --ui",
"test:playwright:all": "cd tests/playwright && WEKAN_PLAYWRIGHT_ALL=1 npx playwright test --project=chromium --project=firefox --project=webkit",
"test:playwright:report": "cd tests/playwright && npx playwright show-report",
"playwright:install": "cd tests/playwright && npx playwright install --with-deps",
"postinstall": "node scripts/patch-yargs-dirname.cjs"
},
"devDependencies": {
"@meteorjs/rspack": "^2.0.1",
"@rsdoctor/rspack-plugin": "^1.5.7",
"@rspack/cli": "^1.7.11",
"@rspack/core": "^1.7.11",
"@typescript-eslint/eslint-plugin": "^8.63.0",
"@typescript-eslint/parser": "^8.60.1",
"chai": "^6.2.2",
"chai-as-promised": "^8.0.2",
"css-loader": "^7.1.4",
"mongodb": "^7.5.0",
"puppeteer": "^25.3.0",
"sinon": "^22.0.0",
"sinon-chai": "^4.0.1",
"style-loader": "^4.0.0"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.1090.0",
"@aws-sdk/lib-storage": "~3.1085.0",
"@azure/storage-blob": "^12.33.0",
"@babel/parser": "^7.29.2",
"@babel/runtime": "^8.0.0",
"@google-cloud/storage": "^7.21.0",
"@meteorjs/reify": "^0.25.4",
"@rwap/jquery-ui-touch-punch": "^1.0.11",
"@swc/helpers": "^0.5.23",
"@textcomplete/contenteditable": "^0.1.13",
"@textcomplete/core": "^0.1.13",
"@textcomplete/textarea": "^0.1.13",
"@tweedegolf/sab-adapter-amazon-s3": "^3.0.4",
"@tweedegolf/sab-adapter-azure-blob": "^3.0.2",
"@tweedegolf/sab-adapter-google-cloud": "^3.0.2",
"@wekanteam/dragscroll": "^0.0.9",
"@wekanteam/exceljs": "^4.7.3",
"@wekanteam/html-to-markdown": "^1.0.3",
"@wekanteam/meteor-globals": "^1.1.6",
"@wekanteam/meteor-reactive-cache": "^1.0.8",
"autosize": "^6.0.1",
"bson": "^7.3.0",
"dompurify": "^3.4.12",
"escape-string-regexp": "^5.0.0",
"filesize": "^11.0.22",
"glob": "^13.0.6",
"hotkeys-js": "^4.0.2",
"i18next": "^26.3.6",
"i18next-sprintf-postprocessor": "^0.2.2",
"archiver": "^8.0.0",
"jquery": "^3.7.1",
"jquery-ui": "^1.14.2",
"jszip": "^3.7.1",
"unzipper": "^0.12.3",
"limax": "^4.2.3",
"markdown-it": "^14.1.1",
"markdown-it-emoji": "^3.0.0",
"markdown-it-math": "^6.0.0",
"meteor-accounts-t9n": "^2.6.0",
"meteor-node-stubs": "file:npm-packages/meteor-node-stubs",
"papaparse": "^5.5.4",
"pretty-ms": "^9.3.0",
"temml": "^0.13.3",
"underscore": "^1.13.8"
},
"overrides": {
"sourcemap-codec": "npm:@jridgewell/sourcemap-codec@^1.4.15",
"elliptic": "^6.6.1",
"archiver-utils": {
"glob": "$glob"
},
"uuid": "^14.0.0",
"webpack-dev-server": "^5.2.5"
}
}