perf_tester 1.0.2
perf_tester: ^1.0.2 copied to clipboard
Compare Dart and Flutter implementations: check that outputs match, time them, test whether the difference is significant, run AOT, and capture CPU profiles.
1.0.2 #
- Flutter 3.50 compatability
1.0.1 #
perf_tester:aoton Windows: with several files, it prints each file's path relative to the package, as on macOS and Linux. Before, it printed the absolute path with mixed separators.
1.0.0 #
- First stable release.
0.1.2 #
- Excludes build and platform folders from analysis, as Flutter 3.47 does. No code changes.
0.1.1 #
perf_tester:aot --dartnow fails, and prints the build error, when the code needsdart:ui. Before, it printed nothing and exited with 0.
0.1.0 #
First release.
PerfTestercompares two or more implementations on the same inputs. It checks that their outputs match, warms them up, and times them.run()returns aPerfResultwith raw samples, statistics, the verification result, comparisons, and CPU profiles.- Fast implementations get several passes per sample, so each sample takes
at least
minSampleTime. Synchronous results are not awaited. - Each implementation is compared to the first with a two-sided Mann-Whitney U test. The verdict is faster, slower, no significant difference, or too few samples.
ConsoleReporterprints a results table, comparisons, and timing histograms.SilentReporterprints nothing. ExtendPerfReporterfor other output.- CPU profiling through the VM service, with an optional DevTools JSON file per implementation.
PerfResult.compilationModetells whether the run was JIT or AOT. Under the JIT, the console warns that comparisons can be wrong.dart run perf_tester:aotbuilds Dart or Flutter files AOT and runs them. It accepts scripts,package:testfiles, andflutter_testfiles withtestWidgets. Several files share one build, and each runs in its own process.