From 2034dd6597f3bfc07abf4a64c3767d61376fdf6d Mon Sep 17 00:00:00 2001 From: chandan Date: Tue, 4 Aug 2026 15:14:50 +0530 Subject: [PATCH] Publish performance charts on the README --- .github/workflows/perf-charts.yml | 62 +++++++++++++++++++++++++++++++ README.md | 7 ++++ 2 files changed, 69 insertions(+) create mode 100644 .github/workflows/perf-charts.yml diff --git a/.github/workflows/perf-charts.yml b/.github/workflows/perf-charts.yml new file mode 100644 index 000000000..019aaaabc --- /dev/null +++ b/.github/workflows/perf-charts.yml @@ -0,0 +1,62 @@ +name: performance-charts + +# Regenerates the performance history charts from the committed test-report +# history and publishes them into this repo (shown on the README). Runs after +# either performance test completes, and can also be triggered manually. +on: + workflow_dispatch: + workflow_run: + workflows: + - performance-test-febrl120K + - performance-test-ncVoters5M + types: + - completed + +permissions: + contents: write + +jobs: + charts: + name: performance-charts + runs-on: ubuntu-latest + steps: + - name: Checkout repo content + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: 3.12.7 + + - name: Install plotting dependencies + run: pip install pandas matplotlib + + - name: Clone performance reports repo + run: | + set -e + git clone https://x-access-token:${{ secrets.GH_PERF_COMMUNITY_ACTION }}@github.com/zinggAI/zingg_community_performance_reports.git + + - name: Fetch chart script + run: | + wget -O plot_result.py https://raw.githubusercontent.com/zinggAI/zingg_performance/main/plot_result.py + + - name: Generate charts + env: + REPORTS_REPO: zingg_community_performance_reports + CHART_DIR: assets + OSS_REPO: zinggAI/zingg + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + python plot_result.py + + - name: Commit charts + run: | + git config user.name sonalgoyal + git config user.email sonalgoyal4@gmail.com + git add assets/performance_chart_*.png + if git diff --cached --quiet; then + echo "No chart changes to commit." + else + git commit -m "update performance charts" + git push + fi diff --git a/README.md b/README.md index 8959a4f7f..5fcdee12b 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,13 @@ [![performance-test-febrl120K](https://github.com/zinggAI/zingg/actions/workflows/perfTest-febrl120K.yml/badge.svg)](https://github.com/zinggAI/zingg/actions/workflows/perfTest-febrl120K.yml) [![performance-test-ncVoters5M](https://github.com/zinggAI/zingg/actions/workflows/perfTest-ncVoters5M.yml/badge.svg)](https://github.com/zinggAI/zingg/actions/workflows/perfTest-ncVoters5M.yml) +## Performance + +Runtime history across releases, updated automatically on every performance run. + +![febrl 120K performance history](assets/performance_chart_febrl120K.png) +![ncVoters 5M performance history](assets/performance_chart_ncVoters5M.png) + ## 0.6.0 release is out! ## The Problem