Skip to content

Commit 7c89af4

Browse files
committed
preface CORES|TIMEOUT with STRESS_ for verbosity
1 parent a6f53ed commit 7c89af4

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export DOCKER_NETWORK ?= stacks
2525
SERVICES := $(shell CHAINSTATE_DIR="" docker compose -f docker/docker-compose.yml --profile=default config --services)
2626
PAUSE_HEIGHT ?= 999999999999
2727
# Used for the stress testing target. modifies how much cpu to consume for how long
28-
CORES ?= $(shell cat /proc/cpuinfo | grep processor | wc -l)
29-
TIMEOUT ?= 120
28+
STRESS_CORES ?= $(shell cat /proc/cpuinfo | grep processor | wc -l)
29+
STRESS_TIMEOUT ?= 120
3030

3131
# Create the chainstate dir and extract an archive to it when the "up" target is used
3232
$(CHAINSTATE_DIR): /usr/bin/tar /usr/bin/zstd
@@ -166,9 +166,9 @@ restart: check-params | check-running
166166
# use 'stress' binary to consume defined cpu over a specified time
167167
stress:
168168
@echo "Stressing system CPU $(PARAMS)"
169-
@echo " Cores: $(CORES)"
170-
@echo " Timeout: $(TIMEOUT)"
171-
stress --cpu $(CORES) --timeout $(TIMEOUT)
169+
@echo " Cores: $(STRESS_CORES)"
170+
@echo " Timeout: $(STRESS_TIMEOUT)"
171+
stress --cpu $(STRESS_CORES) --timeout $(STRESS_TIMEOUT)
172172

173173
# run the test script to verify the services are all load and operating as expected
174174
test:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ make start <service name>
8888

8989
#### Stress the CPU
9090
To simulate CPU load. Can be modified with:
91-
- `CORES` to target how many worker threads (default will use all cores)
92-
- `TIMEOUT` set a timeout (default of 120s)
91+
- `STRESS_CORES` to target how many worker threads (default will use all cores)
92+
- `STRESS_TIMEOUT` set a timeout (default of 120s)
9393
```sh
9494
make stress
9595
```
9696
```sh
97-
CORES=10 TIMEOUT=60 make stress
97+
STRESS_CORES=10 STRESS_TIMEOUT=60 make stress
9898
```
9999

100100
#### Create a chainstate snapshot

0 commit comments

Comments
 (0)