dart-lang / native

Dart packages related to FFI and native assets bundling.
BSD 3-Clause "New" or "Revised" License
107 stars 36 forks source link

Benchmarks #718

Open dcharkes opened 1 year ago

dcharkes commented 1 year ago

We should add benchmarks to this repo.

We should include benchmarks with method channels to see how the performance compares:

Unfortunately, running a Flutter app is hard without a window manager, so that might make it impossible to run the method channels benchmarks in an automated fashion.

So, besides having trying to run the benchmarks on CI, we should probably also upload benchmark results manually to the repo. (Extra kudos for making the benchmarks just generate json/yaml as output and a script that takes all the benchmarks, collects all the outputs and generates a benchmark_results.md so that updating the numbers is trivial later on.)

Fur running flutter apps from CLI flutter drive. (Or use flutter run capture stdout and just exit(0); when done with benchmarking.)

mahesh-hegde commented 1 year ago
  1. Can benchmark_harness be run on flutter Android device?

  2. Can this be useful to automatically benchmark on real device? https://docs.flutter.dev/testing/integration-tests#testing-on-firebase-test-lab

fzyzcjy commented 7 months ago

Btw I come across this and here are my two cents:

We should explore if there is a way to do benchmarks on CI. @benchmark-action has no Dart support yet, but if the interface is json or something we might still be able to use it.

Yes, I already did it in flutter_rust_bridge v2 and it works well. You simply output to a file with the JSON format it requires, and everything works.

HosseinYousefi commented 2 months ago

I made this repo for various benchmarks. Different branches contain different experiments. https://github.com/HosseinYousefi/jnigen_benchmark

Adding this to 1.0.0 milestone to make sure the CI runs benchmarks and provides reports.