Skip to content

Commit

Permalink
run cold start test
Browse files Browse the repository at this point in the history
  • Loading branch information
waveywaves committed Mar 29, 2024
1 parent a46499c commit dfc9a14
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/e2e-perf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

env:
N_SIMUL_PERF_DATA_FILE: n-simul-perf-data.json
COLD_START_PERF_DATA_FILE: cold-start.txt
E2E_UTILS: ./hack/e2e/perf/scripts/utils.sh

permissions:
Expand Down Expand Up @@ -97,11 +98,21 @@ jobs:
helm upgrade --install --wait pr-${{ github.event.pull_request.number }} \
./chart -f helm-values.yaml
- name: Create PERF_DATA_FILE
- name: Time taken to create a cluster on cold start
run: |
bash hack/e2e/perf/01-multicluster.sh 1 > $COLD_START_PERF_DATA_FILE
- name: Rename and update COLD_START_PERF_DATA_FILE
run: |
NEW_NAME="${COLD_START_PERF_DATA_FILE%.txt}-${{ matrix.git_branch }}.txt"
mv COLD_START_PERF_DATA_FILE $NEW_NAME
echo "COLD_START_PERF_DATA_FILE=$NEW_NAME" >> $GITHUB_ENV
- name: Create N_SIMUL_PERF_DATA_FILE
run: |
# Ensure the file exists and initialize it as an empty array if not
if [ ! -f "$PERF_DATA_FILE" ]; then
echo '[]' > "$PERF_DATA_FILE"
if [ ! -f "$N_SIMUL_PERF_DATA_FILE" ]; then
echo '[]' > "$N_SIMUL_PERF_DATA_FILE"
fi
- name: Time taken to create UffizziClusters with different numbers of workers
Expand All @@ -117,10 +128,10 @@ jobs:
# time taken to create n clusters simultaneously
time=$(bash hack/e2e/perf/01-multicluster.sh $n_simultaneous_clusters)
bash $E2E_UTILS update_json_with_workers_and_time $n_workers $time $PERF_DATA_FILE
bash $E2E_UTILS update_json_with_workers_and_time $n_workers $time $N_SIMUL_PERF_DATA_FILE
done
cat $PERF_DATA_FILE
cat $N_SIMUL_PERF_DATA_FILE
# - name: dummy data
# shell: bash
Expand All @@ -139,17 +150,17 @@ jobs:
# {"workers": 30, "time": '$((300 * factor))'}
# ]' > $PERF_DATA_FILE

- name: Rename and update PERF_DATA_FILE
- name: Rename and update N_SIMUL_PERF_DATA_FILE
run: |
NEW_NAME="${PERF_DATA_FILE%.json}-${{ matrix.git_branch }}.json"
mv $PERF_DATA_FILE $NEW_NAME
echo "PERF_DATA_FILE=$NEW_NAME" >> $GITHUB_ENV
NEW_NAME="${N_SIMUL_PERF_DATA_FILE%.json}-${{ matrix.git_branch }}.json"
mv $N_SIMUL_PERF_DATA_FILE $NEW_NAME
echo "N_SIMUL_PERF_DATA_FILE=$NEW_NAME" >> $GITHUB_ENV
- name: Upload PERF_DATA_FILE artifact
- name: Upload N_SIMUL_PERF_DATA_FILE artifact
uses: actions/upload-artifact@v2
with:
name: perf-data-${{ matrix.git_branch }}
path: ${{ env.PERF_DATA_FILE }}
path: ${{ env.N_SIMUL_PERF_DATA_FILE }}

performance-overview:
name: Collate performance data and post overview
Expand Down

0 comments on commit dfc9a14

Please sign in to comment.