Skip to content

Commit bbb1215

Browse files
committed
upload nightly tps metrics to s3
1 parent 96e2dab commit bbb1215

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

.github/workflows/nightly-throughput-stress.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
schedule:
55
# Run at 3 AM PST (11:00 UTC) - offset from existing nightly
66
- cron: '00 11 * * *'
7-
push:
8-
branches:
9-
- add-nightly-throughput-stress-workflow
107
workflow_dispatch:
118
inputs:
129
duration:
@@ -33,6 +30,9 @@ env:
3330
TEST_DURATION: ${{ inputs.duration || vars.NIGHTLY_TEST_DURATION || '5h' }}
3431
TEST_TIMEOUT: ${{ inputs.timeout || vars.NIGHTLY_TEST_TIMEOUT || '5h30m' }}
3532

33+
# AWS S3 metrics upload ARN
34+
AWS_S3_METRICS_UPLOAD_ROLE_ARN: ${{ vars.AWS_S3_METRICS_UPLOAD_ROLE_ARN }}
35+
3636
# Logging and artifacts
3737
WORKER_LOG_DIR: /tmp/throughput-stress-logs
3838

@@ -107,6 +107,14 @@ jobs:
107107
- name: Install Temporal CLI
108108
uses: temporalio/setup-temporal@v0
109109

110+
- name: Install Prometheus
111+
run: |
112+
PROM_VERSION="3.8.0"
113+
wget -q https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz
114+
tar xzf prometheus-${PROM_VERSION}.linux-amd64.tar.gz
115+
sudo mv prometheus-${PROM_VERSION}.linux-amd64/prometheus /usr/local/bin/
116+
prometheus --version
117+
110118
- name: Setup log directory
111119
run: mkdir -p $WORKER_LOG_DIR
112120

@@ -139,13 +147,37 @@ jobs:
139147
--duration $TEST_DURATION \
140148
--timeout $TEST_TIMEOUT \
141149
--max-concurrent 10 \
150+
--prom-listen-address 127.0.0.1:9091 \
151+
--worker-prom-listen-address 127.0.0.1:9092 \
152+
--prom-instance-addr 127.0.0.1:9090 \
153+
--prom-instance-config \
154+
--prom-export-worker-metrics $RUN_ID.parquet \
142155
--option internal-iterations=10 \
143156
--option continue-as-new-after-iterations=3 \
144157
--option sleep-time=1s \
145158
--option visibility-count-timeout=5m \
146159
--option min-throughput-per-hour=1000 \
147160
2>&1 | tee $WORKER_LOG_DIR/scenario.log
148161
162+
- name: Configure AWS credentials
163+
if: always()
164+
uses: aws-actions/configure-aws-credentials@v4
165+
with:
166+
role-to-assume: ${{ env.AWS_S3_METRICS_UPLOAD_ROLE_ARN }}
167+
aws-region: us-west-2
168+
169+
- name: Upload metrics to S3
170+
if: always()
171+
run: |
172+
DATE=$(date +%Y-%m-%d)
173+
# Use test/ prefix on non-main branches
174+
PREFIX="language=python/date=$DATE"
175+
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
176+
PREFIX="test/$PREFIX"
177+
fi
178+
aws s3 cp omes/$RUN_ID.parquet \
179+
"s3://cloud-data-ingest-prod/github/sdk_load_test/$PREFIX/$RUN_ID.parquet"
180+
149181
- name: Upload logs on failure
150182
if: failure() || cancelled()
151183
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)