Skip to content

Commit

Permalink
Performance test remove tag comparison (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
louiseschmidtgen authored Nov 26, 2024
1 parent 865a9e3 commit 1e36ad1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 48 deletions.
48 changes: 1 addition & 47 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,6 @@ jobs:
sudo cp ./bin/static/k8s-dqlite snap-unpack-dir/bin/k8s-dqlite
sudo chmod o+r snap-unpack-dir/bin/k8s-dqlite
sudo mksquashfs snap-unpack-dir base-code.snap -noappend -comp lzo -no-fragments
- name: Create snap with k8s-dqlite v1.1.11
run: |
set -o pipefail
git fetch origin --tags
git reset --hard v1.1.11
make static
sudo cp ./bin/static/k8s-dqlite snap-unpack-dir/bin/k8s-dqlite
sudo chmod o+r snap-unpack-dir/bin/k8s-dqlite
sudo mksquashfs snap-unpack-dir v1-1-11.snap -noappend -comp lzo -no-fragments
- name: Create snap with k8s-dqlite v1.2.0
run: |
set -o pipefail
git fetch origin --tags
git reset --hard v1.2.0
make static
sudo cp ./bin/static/k8s-dqlite snap-unpack-dir/bin/k8s-dqlite
sudo chmod o+r snap-unpack-dir/bin/k8s-dqlite
sudo mksquashfs snap-unpack-dir v1-2-0.snap -noappend -comp lzo -no-fragments
- name: Switch back to target branch
run: git reset --hard $TARGET_SHA
- name: Run Performance test ${{ github.head_ref }} snap
Expand All @@ -121,45 +103,17 @@ jobs:
cd test/performance
mkdir -p ./results/base-code
sg lxd -c 'tox -e performance'
- name: Run Performance test for v1.1.11 snap
env:
TEST_SNAP: ${{ github.workspace }}/v1-1-11.snap
TEST_SUBSTRATE: lxd
TEST_LXD_IMAGE: ubuntu:22.04
TEST_INSPECTION_REPORTS_DIR: ${{ github.workspace }}/inspection-reports
TEST_METRICS_DIR: ${{ github.workspace }}/test/performance/results/v1-1-11
TEST_RUN_NAME: v1-1-11
run: |
cd test/performance
mkdir -p ./results/v1-1-11
sg lxd -c 'tox -e performance'
- name: Run Performance test for v1.2.0 snap
env:
TEST_SNAP: ${{ github.workspace }}/v1-2-0.snap
TEST_SUBSTRATE: lxd
TEST_LXD_IMAGE: ubuntu:22.04
TEST_INSPECTION_REPORTS_DIR: ${{ github.workspace }}/inspection-reports
TEST_METRICS_DIR: ${{ github.workspace }}/test/performance/results/v1-2-0
TEST_RUN_NAME: v1-2-0
run: |
cd test/performance
mkdir -p ./results/v1-2-0
sg lxd -c 'tox -e performance'
- name: Generate 3 node Graphs
run: |
cd test/performance
sudo Rscript parse-performance-metrics.R -p ./results/head -o ./results/head -f *three-node.log
sudo Rscript parse-performance-metrics.R -p ./results/base-code -o ./results/base-code -f *three-node.log
sudo Rscript parse-performance-metrics.R -p ./results/v1-1-11 -o ./results/v1-1-11 -f *three-node.log
sudo Rscript parse-performance-metrics.R -p ./results/v1-2-0 -o ./results/v1-2-0 -f *three-node.log
- name: Generate single node Graphs
run: |
cd test/performance
mkdir -p ./results/single-node
cp ./results/head/*single-node.log ./results/single-node
cp ./results/base-code/*single-node.log ./results/single-node
cp ./results/v1-1-11/*single-node.log ./results/single-node
cp ./results/v1-2-0/*single-node.log ./results/single-node
sudo Rscript parse-performance-metrics.R -p ./results/single-node -o ./results/single-node -f *single-node.log
- name: Upload performance result
uses: actions/upload-artifact@v4
Expand All @@ -170,7 +124,7 @@ jobs:
if: failure()
run: |
tar -czvf inspection-reports.tar.gz -C ${{ github.workspace }} inspection-reports
echo "artifact_name=inspection-reports-${{ matrix.os }}" | sed 's/:/-/g' >> $GITHUB_ENV
echo "artifact_name=inspection-reports" | sed 's/:/-/g' >> $GITHUB_ENV
- name: Upload inspection report artifact
if: failure()
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion test/performance/tests/test_util/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def collect_metrics(instances: List[harness.Instance]):
def pull_metrics(instances: List[harness.Instance], test_name: str):
"""Pulls metrics file from each instance to the local machine."""
for i, instance in enumerate(instances, start=1):
out_file = f"{config.METRICS_DIR}/{config.RUN_NAME}-{i}-{test_name}.log"
out_file = f"{config.METRICS_DIR}/{config.RUN_NAME}-{i}-of{len(instances)}-{test_name}.log"
instance.pull_file(
f"/root/{instance.id}_metrics.log",
out_file,
Expand Down

0 comments on commit 1e36ad1

Please sign in to comment.