mirror of
https://github.com/zerotier/coyote.git
synced 2024-11-24 12:18:02 +00:00
make tasks to test at nproc / 2, which minimizes cpu thrashing
closes #17 Signed-off-by: Erik Hollensbe <git@hollensbe.org>
This commit is contained in:
parent
09ace2222d
commit
1167e36ead
2 changed files with 21 additions and 2 deletions
9
Makefile
9
Makefile
|
@ -4,7 +4,12 @@ postgres: stop-postgres
|
|||
stop-postgres:
|
||||
docker rm -f acmed-postgres || :
|
||||
|
||||
run-with-backtrace:
|
||||
RUST_BACKTRACE=1 rustup run nightly cargo run
|
||||
CARGO_TEST=cargo test -- --test-threads $$(($$(nproc) / 2))
|
||||
|
||||
test:
|
||||
${CARGO_TEST}
|
||||
|
||||
debug-test:
|
||||
DEBUG=1 cargo test -- --nocapture --test-threads $$(($$(nproc) / 2))
|
||||
|
||||
.PHONY: postgres stop-postgres
|
||||
|
|
14
README.md
14
README.md
|
@ -53,10 +53,24 @@ psql -U postgres -h localhost coyote
|
|||
|
||||
`docker` is required to run the tests. The tests take around 70 seconds to run on a 5900X and use all 24 threads most of the test runtime. Be mindful of the time they take, especially when running them on a slower system.
|
||||
|
||||
If you like full throttle:
|
||||
|
||||
```
|
||||
cargo test
|
||||
```
|
||||
|
||||
Add `DEBUG=1` for verbose test logging.
|
||||
|
||||
If you'd like tests that don't punish your processor, you can run:
|
||||
|
||||
```
|
||||
make test
|
||||
# or
|
||||
make debug-test
|
||||
```
|
||||
|
||||
To accomplish the same using roughly only half of the CPU time.
|
||||
|
||||
## Task List
|
||||
|
||||
### JOSE/ACME Protocols:
|
||||
|
|
Loading…
Reference in a new issue