Skip to content

Commit

Permalink
Speed up tests locally by upto 45% (#1818)
Browse files Browse the repository at this point in the history
# Which problem is this PR solving?
- This PR aims to add an additional flag to the jest script which would
make running tests locally even faster than ever.

## Description of the changes
- It uses `--maxWorkers=50%` flag to do so.

## How was this change tested?
- It was tested with several flags as below;

```bash
-----------------
yarn test

Time:        96.903 s
-----------------
yarn test --runInBand

Time:        131.721 s, estimated 606 s
-----------------
yarn test --maxWorkers=50%

Time:        53.295 s
-----------------
```

Operating System Used to Benchmark:
`Ubuntu 22`

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>
  • Loading branch information
anshgoyalevil committed Sep 24, 2023
1 parent a422282 commit e51ec20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jaeger-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"coverage": "yarn run test-ci --coverage",
"start:ga-debug": "REACT_APP_GA_DEBUG=1 REACT_APP_VSN_STATE=$(../../scripts/get-tracking-version.js) vite",
"start": "vite",
"test": "jest",
"test": "jest --maxWorkers=50%",
"test-ci": "CI=1 jest --silent --color --maxWorkers=4"
},
"jest": {
Expand Down

0 comments on commit e51ec20

Please sign in to comment.