Skip to content

Improve Diagnostics + Measure DB Performance #117

Improve Diagnostics + Measure DB Performance

Improve Diagnostics + Measure DB Performance #117

Workflow file for this run

on:
merge_group:
pull_request:
workflow_dispatch:
name: benchmark
permissions:
contents: write
deployments: write
env:
PROJECT_PATH: commet
jobs:
benchmark:
name: benchmark
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Setup Flutter
uses: subosito/flutter-action@v2.8.0
with:
flutter-version: '3.22.2'
channel: 'stable'
- name: Setup Dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev libolm3 libmpv-dev mpv ffmpeg libmimalloc-dev
- name: Configure Flutter
run: flutter config --enable-linux-desktop
- name: Code Generation
run: |
cd $PROJECT_PATH
dart run scripts/codegen.dart
- name: Benchmark
run: |
cd $PROJECT_PATH
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1920x1080x24 > /dev/null 2>&1 &
ffmpeg -f x11grab -video_size 1920x1080 -framerate 15 -i :99 -vcodec libx264 -preset ultrafast -qp 0 -nostdin -loglevel quiet -pix_fmt yuv444p video.mkv &
flutter drive -d linux --driver=test_driver/benchmark_driver.dart --target=integration_test/benchmark/benchmark.dart --profile
INTEGRATION_TEST_EXIT_CODE=$?
sleep 1
kill $(pgrep ffmpeg)
exit $INTEGRATION_TEST_EXIT_CODE
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: result.mkv
path: commet/video.mkv
- name: Store benchmark result - separate results repo
uses: benchmark-action/github-action-benchmark@v1
with:
name: Benchmark
tool: 'customSmallerIsBetter'
output-file-path: commet/build/customSmallerIsBetter.json
github-token: ${{ secrets.BENCHMARK_ACTION_BOT_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '350%'
comment-on-alert: true
fail-on-alert: false
summary-always: true
gh-repository: 'github.com/commetchat/commet_benchmark_results'