diff --git a/.github/workflows/generate-graphs.yml b/.github/workflows/generate-graphs.yml new file mode 100644 index 0000000000..a8c0534e09 --- /dev/null +++ b/.github/workflows/generate-graphs.yml @@ -0,0 +1,46 @@ +name: Generate Graphs + +on: + push: + branches: + - main + paths: + - "data/last.json" + workflow_dispatch: + +permissions: + contents: write + +jobs: + generate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "pip" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pandas matplotlib + + - name: Generate graphs + run: python graph-generator/app.py + + - name: Commit and push graphs + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add graphs/*.svg + if git diff --staged --quiet; then + echo "No changes to graphs" + else + git commit -m "docs: update performance graphs" + git push + fi diff --git a/README.md b/README.md index a1dddd87cb..8a84d424e7 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,14 @@ After all these invocations, all information stored in DynamoDB is aggregated an ### Step 4 -A static website, hosted on GitHub pages here: https://maxday.github.io/lambda-perf/ fetches this JSON file and displays the result in a (nice?) UI. +Using the data from the last 2 years, SVG charts are generated to show how the performance of each runtime has evolved over time. These files are stored in the /graphs folder. ### Step 5 +A static website, hosted on GitHub pages here: https://maxday.github.io/lambda-perf/ fetches this JSON file and displays the result in a (nice?) UI. + +### Step 6 + Hack/Fork/Send PR and create your own benchmarks! ## Disclaimer diff --git a/docs/css/custom.css b/docs/css/custom.css index 80ddbdcd69..7665777a25 100644 --- a/docs/css/custom.css +++ b/docs/css/custom.css @@ -3,7 +3,7 @@ html { min-height: 100%; } body { - margin-bottom: 120px; + margin-bottom: 120px; } hr { margin-bottom: 2px; @@ -13,7 +13,7 @@ hr { position: absolute; bottom: 0; width: 100%; - height: 100px; + height: 100px; line-height: 60px; background-color: #f5f5f5; text-align: center; @@ -66,6 +66,16 @@ hr { text-align: right; font-size: 9px; } +.graph-container { + cursor: pointer; + transition: transform 0.2s; +} +.graph-container:hover { + transform: scale(1.02); +} +.smallGraph { + border-radius: 4px; +} .badge:empty { display: inline-block; } diff --git a/docs/index.html b/docs/index.html index 943acc811a..2feba0d412 100644 --- a/docs/index.html +++ b/docs/index.html @@ -74,6 +74,11 @@