Skip to content

Commit

Permalink
chore(bench): allow configuring count
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Janiszewski <tomek@redhat.com>
  • Loading branch information
janisz committed Nov 6, 2023
1 parent 9562d34 commit 6383126
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -6,6 +6,7 @@ TESTFLAGS=-race -p 4
BASE_DIR=$(CURDIR)
BENCHTIME ?= 1x
BENCHTIMEOUT ?= 20m
BENCHCOUNT ?= 1

ifeq (,$(findstring podman,$(shell docker --version 2>/dev/null)))
# Podman DTRT by running processes unprivileged in containers,
Expand Down Expand Up @@ -512,7 +513,7 @@ go-postgres-unit-tests: build-prep test-prep
go-postgres-bench-tests: build-prep test-prep
@# The -p 1 passed to go test is required to ensure that tests of different packages are not run in parallel, so as to avoid conflicts when interacting with the DB.
set -o pipefail ; \
CGO_ENABLED=1 GODEBUG=cgocheck=2 MUTEX_WATCHDOG_TIMEOUT_SECS=30 ROX_POSTGRES_DATASTORE=true GOTAGS=$(GOTAGS),test,sql_integration scripts/go-test.sh -p 1 -run=nonthing -bench=. -benchtime=$(BENCHTIME) -benchmem -timeout $(BENCHTIMEOUT) -v \
CGO_ENABLED=1 GODEBUG=cgocheck=2 MUTEX_WATCHDOG_TIMEOUT_SECS=30 ROX_POSTGRES_DATASTORE=true GOTAGS=$(GOTAGS),test,sql_integration scripts/go-test.sh -p 1 -run=nonthing -bench=. -benchtime=$(BENCHTIME) -benchmem -timeout $(BENCHTIMEOUT) -count $(BENCHCOUNT) -v \
$(shell git grep -rl "testing.B" central pkg migrator tools | sed -e 's@^@./@g' | xargs -n 1 dirname | sort | uniq | xargs go list -tags sql_integration | grep -v '^github.com/stackrox/rox/tests$$' | grep -Ev $(UNIT_TEST_IGNORE)) \
| tee $(GO_TEST_OUTPUT_PATH)

Expand Down

0 comments on commit 6383126

Please sign in to comment.