diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 49b8cc8a17a..befcde3c066 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -18,6 +18,12 @@ updates: interval: "weekly" open-pull-requests-limit: 10 + - package-ecosystem: "npm" + directory: /benchmarks + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + - package-ecosystem: docker directory: /build schedule: diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 545f5d9d081..5afcbddd807 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -20,10 +20,14 @@ jobs: uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: lts/* - - name: Install Modules + - name: Install Modules for undici + run: npm i --ignore-scripts --omit=dev + - name: Install Modules for Benchmarks run: npm i + working-directory: ./benchmarks - name: Run Benchmark run: npm run bench + working-directory: ./benchmarks benchmark_branch: name: benchmark branch @@ -37,7 +41,11 @@ jobs: uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: lts/* - - name: Install Modules + - name: Install Modules for undici + run: npm i --ignore-scripts --omit=dev + - name: Install Modules for Benchmarks run: npm i + working-directory: ./benchmarks - name: Run Benchmark run: npm run bench + working-directory: ./benchmarks diff --git a/benchmarks/package.json b/benchmarks/package.json new file mode 100644 index 00000000000..5781ae37478 --- /dev/null +++ b/benchmarks/package.json @@ -0,0 +1,20 @@ +{ + "name": "benchmarks", + "scripts": { + "bench": "PORT=3042 concurrently -k -s first npm:bench:server npm:bench:run", + "bench:server": "node ./server.js", + "prebench:run": "node ./wait.js", + "bench:run": "SAMPLES=100 CONNECTIONS=50 node ./benchmark.js" + }, + "dependencies": { + "axios": "^1.6.7", + "concurrently": "^8.2.2", + "cronometro": "^3.0.1", + "got": "^14.2.0", + "mitata": "^0.1.11", + "node-fetch": "^3.3.2", + "request": "^2.88.2", + "superagent": "^8.1.2", + "wait-on": "^7.2.0" + } +} diff --git a/package.json b/package.json index 748b8098ca0..94e30d2736a 100644 --- a/package.json +++ b/package.json @@ -82,10 +82,7 @@ "test:wpt": "node test/wpt/start-fetch.mjs && node test/wpt/start-FileAPI.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node test/wpt/start-websockets.mjs && node test/wpt/start-cacheStorage.mjs && node test/wpt/start-eventsource.mjs", "coverage": "nyc --reporter=text --reporter=html npm run test", "coverage:ci": "nyc --reporter=lcov npm run test", - "bench": "PORT=3042 concurrently -k -s first npm:bench:server npm:bench:run", - "bench:server": "node benchmarks/server.js", - "prebench:run": "node benchmarks/wait.js", - "bench:run": "SAMPLES=100 CONNECTIONS=50 node benchmarks/benchmark.js", + "bench": "echo \"Error: Benchmarks have been moved to '\/benchmarks'\" && exit 1", "serve:website": "echo \"Error: Documentation has been moved to '\/docs'\" && exit 1", "prepare": "husky install", "fuzz": "jsfuzz test/fuzzing/fuzz.js corpus" @@ -94,34 +91,24 @@ "@matteo.collina/tspl": "^0.1.1", "@sinonjs/fake-timers": "^11.1.0", "@types/node": "^18.0.3", - "@types/superagent": "^8.1.3", "abort-controller": "^3.0.0", - "axios": "^1.6.5", "borp": "^0.9.1", - "concurrently": "^8.0.1", - "cronometro": "^3.0.1", "dns-packet": "^5.4.0", "form-data": "^4.0.0", "formdata-node": "^6.0.3", - "got": "^14.0.0", "https-pem": "^3.0.0", "husky": "^9.0.7", "import-fresh": "^3.3.0", "jest": "^29.0.2", "jsdom": "^24.0.0", "jsfuzz": "^1.0.15", - "mitata": "^0.1.10", - "node-fetch": "^3.3.2", "pre-commit": "^1.2.2", "proxy": "^1.0.2", "proxyquire": "^2.1.3", - "request": "^2.88.2", "snazzy": "^9.0.0", "standard": "^17.0.0", - "superagent": "^8.1.2", "tsd": "^0.30.1", "typescript": "^5.0.2", - "wait-on": "^7.0.1", "ws": "^8.11.0" }, "engines": {