diff --git a/collect-metrics-job.yaml b/collect-metrics-job.yaml index 38c5070..b62ddf5 100644 --- a/collect-metrics-job.yaml +++ b/collect-metrics-job.yaml @@ -19,6 +19,9 @@ data: echo "Starting setup_and_run.sh script..." START_TIME=$(date +%s) + # Add early logging of duration + echo "Duration time set to: ${DURATION_TIME} minutes" + echo "Updating package list and installing required packages..." apt-get update apt-get install -y git curl apt-transport-https ca-certificates @@ -36,14 +39,11 @@ data: awk -F'/' '{print $NF}' | awk -F':' '{if ($2 ~ /^v/) print $1": "$2; else print $1": v"$2}' | sort -u) - # Extract only one `node-agent` version (DaemonSet runs multiple instances) + # Extract only one `node-agent` version NODE_AGENT_VERSION=$(echo "$IMAGE_VERSIONS" | grep "node-agent" | head -n 1) WEBHOOK_URL="${WEBHOOK_URL}" - # Send Slack notification (Job Started) - # curl -X POST --data-urlencode "payload={\"channel\": \"C06AJ92GHLM\", \"username\": \"Performance-test\", \"icon_emoji\": \":rocket:\", \"text\": \"🚀 *Performance Test Started!* \nCluster: \`$CLUSTER_NAME\`\nHelm Chart: \`$HELM_VERSION\`\", \"attachments\": [{\"color\": \"#36a64f\", \"fields\": [{\"title\": \"Image Versions\", \"value\": \"\`\`\`$IMAGE_VERSIONS\`\`\`\", \"short\": false}], \"footer\": \"Kubernetes Cluster\", \"ts\": $(date +%s)}]}" $WEBHOOK_URL - echo "Installing Python dependencies..." pip install --no-cache-dir requests pandas matplotlib plotly numpy @@ -59,7 +59,6 @@ data: git config --global user.name "bvolovat" echo "Waiting for ${EXACT_DURATION} minutes before running tests..." - # sleep $((EXACT_DURATION * 60)) END_TIME=$(date +%s) @@ -80,9 +79,6 @@ data: echo "Test execution complete." - # Send Slack notification (Job Finished) - # curl -X POST --data-urlencode "payload={\"channel\": \"C06AJ92GHLM\", \"username\": \"Performance-test\", \"icon_emoji\": \":white_check_mark:\", \"text\": \"✅ *Performance Test Completed!* \nCluster: \`$CLUSTER_NAME\`\nHelm Chart: \`$HELM_VERSION\`\nDuration: *${EXACT_DURATION} minutes*\", \"attachments\": [{\"color\": \"#36a64f\", \"fields\": [{\"title\": \"Image Versions\", \"value\": \"\`\`\`$IMAGE_VERSIONS\`\`\`\", \"short\": false}], \"footer\": \"Kubernetes Cluster\", \"ts\": $(date +%s)}]}" $WEBHOOK_URL - curl -X POST --data-urlencode "payload={ \"channel\": \"C06AJ92GHLM\", \"username\": \"Performance-test\", @@ -125,6 +121,8 @@ spec: secretKeyRef: name: perf-channel-webhook key: url + - name: EXACT_DURATION + value: "$(DURATION_TIME)" volumeMounts: - name: run-script mountPath: /scripts @@ -142,4 +140,4 @@ spec: name: run-script defaultMode: 0777 - restartPolicy: Never + restartPolicy: Never \ No newline at end of file diff --git a/output/cpu_metrics.csv b/output/cpu_metrics.csv deleted file mode 100644 index 569300c..0000000 --- a/output/cpu_metrics.csv +++ /dev/null @@ -1,4 +0,0 @@ -Time,Pod,Value -2025-02-06 16:32:09.574000+00:00,node-agent-cdj47,0.04688129038152516 -2025-02-06 16:32:09.574000+00:00,node-agent-f5f84,0.08385301738206756 -2025-02-06 16:32:09.574000+00:00,node-agent-r7s4j,0.04197452512269843 diff --git a/output/memory_metrics.csv b/output/memory_metrics.csv deleted file mode 100644 index 4074cbf..0000000 --- a/output/memory_metrics.csv +++ /dev/null @@ -1,4 +0,0 @@ -Time,Pod,Value -2025-02-06 16:32:09.574000+00:00,node-agent-f5f84,334.421875 -2025-02-06 16:32:09.574000+00:00,node-agent-r7s4j,264.4609375 -2025-02-06 16:32:09.574000+00:00,node-agent-cdj47,276.21875 diff --git a/output/node-agent-cdj47_cpu_usage.png b/output/node-agent-cdj47_cpu_usage.png deleted file mode 100644 index a273b83..0000000 Binary files a/output/node-agent-cdj47_cpu_usage.png and /dev/null differ diff --git a/output/node-agent-cdj47_memory_usage.png b/output/node-agent-cdj47_memory_usage.png deleted file mode 100644 index db51679..0000000 Binary files a/output/node-agent-cdj47_memory_usage.png and /dev/null differ diff --git a/output/node-agent-f5f84_cpu_usage.png b/output/node-agent-f5f84_cpu_usage.png deleted file mode 100644 index 94ee37e..0000000 Binary files a/output/node-agent-f5f84_cpu_usage.png and /dev/null differ diff --git a/output/node-agent-f5f84_memory_usage.png b/output/node-agent-f5f84_memory_usage.png deleted file mode 100644 index 85c727a..0000000 Binary files a/output/node-agent-f5f84_memory_usage.png and /dev/null differ diff --git a/output/node-agent-r7s4j_cpu_usage.png b/output/node-agent-r7s4j_cpu_usage.png deleted file mode 100644 index cff793b..0000000 Binary files a/output/node-agent-r7s4j_cpu_usage.png and /dev/null differ diff --git a/output/node-agent-r7s4j_memory_usage.png b/output/node-agent-r7s4j_memory_usage.png deleted file mode 100644 index f77e299..0000000 Binary files a/output/node-agent-r7s4j_memory_usage.png and /dev/null differ diff --git a/output/profiles/node-agent-cdj47_2025-02-06_16-32-14_UTC.speedscope.json b/output/profiles/node-agent-cdj47_2025-02-06_16-32-14_UTC.speedscope.json deleted file mode 100644 index 59f2e15..0000000 --- a/output/profiles/node-agent-cdj47_2025-02-06_16-32-14_UTC.speedscope.json +++ /dev/null @@ -1 +0,0 @@ -{"version": "0.0.7", "shared": {"frames": [{"name": "total"}]}, "profiles": [{"type": "sampled", "name": "Memory Profile - node-agent-cdj47", "unit": "bytes", "startValue": 0, "endValue": 0, "samples": [[0]], "weights": [0]}]} \ No newline at end of file diff --git a/output/profiles/node-agent-f5f84_2025-02-06_16-32-14_UTC.speedscope.json b/output/profiles/node-agent-f5f84_2025-02-06_16-32-14_UTC.speedscope.json deleted file mode 100644 index 5383285..0000000 --- a/output/profiles/node-agent-f5f84_2025-02-06_16-32-14_UTC.speedscope.json +++ /dev/null @@ -1 +0,0 @@ -{"version": "0.0.7", "shared": {"frames": [{"name": "total"}]}, "profiles": [{"type": "sampled", "name": "Memory Profile - node-agent-f5f84", "unit": "bytes", "startValue": 0, "endValue": 0, "samples": [[0]], "weights": [0]}]} \ No newline at end of file diff --git a/output/profiles/node-agent-r7s4j_2025-02-06_16-32-14_UTC.speedscope.json b/output/profiles/node-agent-r7s4j_2025-02-06_16-32-14_UTC.speedscope.json deleted file mode 100644 index 5cae181..0000000 --- a/output/profiles/node-agent-r7s4j_2025-02-06_16-32-14_UTC.speedscope.json +++ /dev/null @@ -1 +0,0 @@ -{"version": "0.0.7", "shared": {"frames": [{"name": "total"}]}, "profiles": [{"type": "sampled", "name": "Memory Profile - node-agent-r7s4j", "unit": "bytes", "startValue": 0, "endValue": 0, "samples": [[0]], "weights": [0]}]} \ No newline at end of file