Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate Android benchmark running / data processing #2991

Merged
merged 7 commits into from
Nov 11, 2024

Conversation

louwers
Copy link
Collaborator

@louwers louwers commented Nov 5, 2024

  • Add one warmup run for caching data.
  • Move slower so that we don't benchmark the renderer not rendering anything.
  • Reduce the amount of styles / locations / total benchmark runs so that the benchmark runs quicker. This allows us to do multiple runs on different devices (of the same type) for more trustworthy data.
  • Add scripts for kicking off benchmark, downloading / processing benchmark results.
  • Add Python script for plotting benchmark results.

Usage:

Kick off benchmark (do this once per renderer, need to edit the script):

cd platform/android
scripts/run-benchmark.sh

From root directory. Collect benchmark results... (Can take multiple --runArn):

outputDir=...
node scripts/aws-device-farm/store-test-artifacts.mjs --customerArtifacts --outputDir  $outputDir --runArn $runArn
node scripts/aws-device-farm/collect-benchmark-outputs.mjs --inputDir $outputDir --outputDir ~/Downloads/run-processed

Now ~/Downloads/run-processed will contain a bunch of JSON files with the benchmark results.

Use Node.js 23 (nvm use 23), collect results in a SQLite database:

node --experimental-sqlite scripts/aws-device-farm/update-benchmark-db.mjs --dbPath benchmark.db --jsonDir ~/Downloads/run-processed

Install matplotlib, plot results:

python3 scripts/aws-device-farm/plot-android-benchmark-results.py benchmark.db

@louwers louwers added the github_actions Pull requests that update GitHub Actions code label Nov 5, 2024
Copy link

github-actions bot commented Nov 5, 2024

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-2991-compared-to-main.txt

@louwers louwers marked this pull request as ready for review November 11, 2024 14:05
@louwers louwers merged commit 6b12d58 into maplibre:main Nov 11, 2024
37 of 39 checks passed
@louwers louwers deleted the benchmark-android branch November 11, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android github_actions Pull requests that update GitHub Actions code ⚡ performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants