Skip to content

Commit

Permalink
chore: create package.json in benchmarks (#2766)
Browse files Browse the repository at this point in the history
* chore: create package.json in benchmarks

* update deps of benchmarks
  • Loading branch information
Uzlopak committed Feb 23, 2024
1 parent 7623f10 commit ef471e6
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 16 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
20 changes: 20 additions & 0 deletions benchmarks/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
15 changes: 1 addition & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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": {
Expand Down

0 comments on commit ef471e6

Please sign in to comment.