From f645a8923a4b5b1a292e5a660081f3168b28a1ca Mon Sep 17 00:00:00 2001 From: Luan Nico Date: Mon, 6 Jan 2025 18:16:33 -0500 Subject: [PATCH] Address comments --- .github/workflows/benchmark.yml | 18 +++++++++--------- .../benchmark/update_components_benchmark.dart | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 95fdc9e8e2..4ab85ae340 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -6,15 +6,15 @@ jobs: benchmark: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 - - uses: bluefireteam/melos-action@v3 + - uses: subosito/flutter-action@v2 + - uses: bluefireteam/melos-action@v3 - - uses: luanpotter/dart-benchmark-action@v0.1.13 - with: - paths: "examples/" - ignore-tag: "no-benchmark" - is-flutter: true - env: + - uses: luanpotter/dart-benchmark-action@v0.1.13 + with: + paths: "examples/" + ignore-tag: "no-benchmark" + is-flutter: true + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/examples/benchmark/update_components_benchmark.dart b/examples/benchmark/update_components_benchmark.dart index 3e0198d1a1..05667491d1 100644 --- a/examples/benchmark/update_components_benchmark.dart +++ b/examples/benchmark/update_components_benchmark.dart @@ -27,9 +27,9 @@ class UpdateComponentsBenchmark extends AsyncBenchmarkBase { @override Future setup() async { _game = FlameGame(); - for (var i = 0; i < _amountComponents; i++) { - _game.add(_BenchmarkComponent(i)); - } + await _game.addAll( + List.generate(_amountComponents, _BenchmarkComponent.new), + ); await _game.ready();