Skip to content

Commit

Permalink
[Test] Save events from failed workspaces in load-tests script (#22888)
Browse files Browse the repository at this point in the history
* save events from failed workspaces
  • Loading branch information
SkorikSergey authored Mar 22, 2024
1 parent 12fd009 commit ac6f4ef
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/performance/load-tests/load-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ function runTest() {
# Create logs directory
mkdir logs || true

# Get all events
kubectl get events --field-selector involvedObject.kind=Pod >logs/events.log

total_time=0
succeeded=0
echo "Calculate average workspaces starting time"
Expand All @@ -107,8 +110,9 @@ function runTest() {
succeeded=$((succeeded + 1))
else
print_error "Timeout waiting for dw$i to become ready or an error occurred."
kubectl describe dw dw$i >logs/dw$i-log.log
kubectl logs $(kubectl get dw dw$i --template='{{.status.devworkspaceId}}') >logs/dw$i-pod.log || true
devworkspace_id=$(kubectl get dw dw$i --template='{{.status.devworkspaceId}}')
kubectl describe dw dw$i >logs/dw$i-describe.log
cat logs/events.log | grep $devworkspace_id >logs/dw$i-$devworkspace_id-events.log
fi
done

Expand Down

0 comments on commit ac6f4ef

Please sign in to comment.