Skip to content

Commit 162b7be

Browse files
committed
reduce test output when generating profile
1 parent 078906e commit 162b7be

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ generate-pgo-profile: build-mock-management-plane-grpc run-load-test-with-cpu-pr
289289
IMAGE_PATH=$(IMAGE_PATH) TAG=${IMAGE_TAG} CONTAINER_NGINX_IMAGE_REGISTRY=${CONTAINER_NGINX_IMAGE_REGISTRY} \
290290
scripts/performance/profiling.sh
291291

292-
@(GOTOOL) pprof -proto -output=default.pgo merged.pprof build/test/load-cpu-profiling/load/metrics_load_cpu.pprof
293-
rm $(find . -type f -name "*.test" | xargs)
292+
@$(GOTOOL) pprof -proto -output=default.pgo merged.pprof build/test/load-cpu-profiling/load/metrics_load_cpu.pprof \
293+
|| { echo "Failed to generate PGO profile"; exit 1; }
294294

295295
# run under sudo locally
296296
load-test-image: ## Build performance load testing image

scripts/performance/profiling.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ for pkg in $packages; do
3333
echo "Profile saved to: ${PROFILES_DIR}/$(basename $pkg)_watcher_cpu.pprof"
3434
done
3535

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 -v \
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
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
4949

5050
## Merge all CPU profiles
5151
files=$(ls ${PROFILES_DIR}/*.pprof)

0 commit comments

Comments
 (0)