File tree Expand file tree Collapse file tree 2 files changed +6
-19
lines changed
Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -296,14 +296,16 @@ generate-pgo-profile: build-mock-management-plane-grpc run-load-test-with-cpu-pr
296296 IMAGE_PATH=$(IMAGE_PATH ) TAG=${IMAGE_TAG} CONTAINER_NGINX_IMAGE_REGISTRY=${CONTAINER_NGINX_IMAGE_REGISTRY} \
297297 scripts/performance/profiling.sh
298298
299- @$(GOTOOL) pprof -proto -output=default.pgo build/test/profiles/merged.pprof build/test/load-cpu-profiling/load/metrics_load_cpu.pprof \
300- || { echo "Failed to generate PGO profile"; exit 1; }
299+ @$(GOTOOL) pprof -proto -output=default.pgo \
300+ build/test/profiles/merged.pprof \
301+ build/test/load-cpu-profiling/load/metrics_load_cpu.pprof \
302+ || { echo "Failed to merge profiles"; exit 1; }
301303
302304# run under sudo locally
303305load-test-image : # # Build performance load testing image
304306 @echo " 🚚 Building load test image"
305- # add --no-cache to the command below to avoid using cache
306307 $(CONTAINER_BUILDENV ) $(CONTAINER_CLITOOL ) build \
308+ --no-cache \
307309 -t $(IMAGE_TAG ) _load_test:1.0.0 . \
308310 -f ./test/docker/load/Dockerfile \
309311 --secret id=nginx-crt,src=$(CERTS_DIR ) /nginx-repo.crt \
Original file line number Diff line number Diff line change 22
33# This script runs Go tests with CPU profiling enabled for all test packages found under the directories:
44# - internal/watcher
5- # - test/integration
65# It saves the CPU profiles in the $PROFILES_DIR directory with the format <package-name>_<test_type>.pprof
7- # e.g. <package-name>_watcher_cpu.pprof or <package-name>_integration_cpu.pprof
6+ # e.g. <package-name>_watcher_cpu.pprof
87
98# The variables below can be set to customize the environment for the integration tests:
109# Example using variables defined in our Makefile:
@@ -33,20 +32,6 @@ for pkg in $packages; do
3332 echo " Profile saved to: ${PROFILES_DIR} /$( basename $pkg ) _watcher_cpu.pprof"
3433done
3534
36- # ## Run integration tests with CPU profiling for each package
37- # echo "Starting integration tests cpu profiling tests..."
38- # packages=$(find test/integration -type f -name '*_test.go' -exec dirname {} \; | sort -u)
39- # echo "Found packages:"
40- # echo "$packages"
41- # for pkg in $packages; do
42- # echo "Running tests in package: ${pkg}"
43- # go test \
44- # -count 3 -timeout 3m \
45- # -cpuprofile "${PROFILES_DIR}/$(basename $pkg)_integration_cpu.pprof" \
46- # "./${pkg}" || { echo "Tests failed in package: ${pkg}, but continuing..."; continue; }
47- # echo "Profile saved to: ${PROFILES_DIR}/$(basename $pkg)_integration_cpu.pprof"
48- # done
49-
5035# # Merge all CPU profiles
5136files=$( ls ${PROFILES_DIR} /* .pprof)
5237echo " Merging CPU profiles: $files "
You can’t perform that action at this time.
0 commit comments