Commit Graph

48 Commits

Author SHA1 Message Date
Michael Goderbauer
68138bc4e5
Fix typing to unblock pub roll (#144968)
The pub roller is blocked on

```
  error � The argument type 'JSArray<JSAny?>' can't be assigned to the parameter type 'JSArray<JSNumber>'.  � dev/benchmarks/macrobenchmarks/lib/web_benchmarks.dart:309:22 � argument_type_not_assignable
```

See https://github.com/flutter/flutter/pull/144852.

The fixes the typing so the next pub roll can (hopefully) succeed.
2024-03-12 16:15:03 +00:00
Srujan Gaddam
d8ffc7390c
Pin package:web 0.4.0 (#138428)
This version is needed so that dart:js_interop can move to extension
types. Also adds some code to handle some breaking changes:

- Body -> Response. Body was an IDL interface mixin type we exposed in
dart:html. Going forward, users should either use Request or Response.
- Casts to JSAny. These are temporary until we move package:web types to
extension types. Currently, package:web types can't implement JSObject
as JSObject will move to be an extension type itself.

Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
2023-11-15 15:03:21 -08:00
Yegor
cb72164a72
[web] benchmark the benchmark harness overhead (#132999)
Add benchmarks that measure the overhead of the benchmark harness itself. We want the overhead to be minimal. Also, these numbers are useful to judge the quality of real benchmarks. If a real benchmark's result is too close to the harness overhead, then it's likely not measuring enough of useful work.
2023-08-24 21:28:04 +00:00
Jackson Gardner
1b887c72b5
Skwasm benchmarks. (#129681)
This enables benchmarks for the Skwasm renderer, compiled with
dart2wasm.

Platform views aren't supported in Skwasm yet, so we are skipping those
benchmarks for now.
2023-06-28 17:16:19 -07:00
Yegor
07772a3d23
[framework,web] add FlutterTimeline and semantics benchmarks that use it (#128366)
## FlutterTimeline

Add a new class `FlutterTimeline` that's a drop-in replacement for `Timeline` from `dart:developer`. In addition to forwarding invocations of `startSync`, `finishSync`, `timeSync`, and `instantSync` to `dart:developer`, provides the following extra methods that make is easy to collect timings for code blocks on a frame-by-frame basis:

* `debugCollect()` - aggregates timings since the last reset, or since the app launched.
* `debugReset()` - forgets all data collected since the previous reset, or since the app launched. This allows clearing data from previous frames so timings can be attributed to the current frame.
* `now` - this was enhanced so that it works on the web by calling `window.performance.now` (in `Timeline` this is a noop in Dart web compilers).
* `collectionEnabled` - a field that controls whether `FlutterTimeline` stores timings in memory. By default this is disabled to avoid unexpected overhead (although the class is designed for minimal and predictable overhead). Specific benchmarks can enable collection to report to Skia Perf.

## Semantics benchmarks

Add `BenchMaterial3Semantics` that benchmarks the cost of semantics when constructing a screen full of Material 3 widgets from nothing. It is expected that semantics will have non-trivial cost in this case, but we should strive to keep it much lower than the rendering cost. This is the case already. This benchmark shows that the cost of semantics is <10%.

Add `BenchMaterial3ScrollSemantics` that benchmarks the cost of scrolling a previously constructed screen full of Material 3 widgets. The expectation should be that semantics will have trivial cost, since we're just shifting some widgets around. As of today, the numbers are not great, with semantics taking >50% of frame time, which is what prompted this PR in the first place. As we optimize this, we want to see this number improve.
2023-06-21 21:37:02 +00:00
Mouad Debbar
a162d7546a
flutter update-packages --force-upgrade (#128908)
- Bumps `vm_service` from `11.6.0` to `11.7.1`
- Bumps `web` from `0.1.3-beta` to `0.1.4-beta` and adds it everywhere.
- Moves `js` from `dependencies` to `dev_dependencies`
2023-06-15 18:17:09 +00:00
Jackson Gardner
7c15a26eab
Reland "Migrate benchmarks to package:web" (#128266)
This attempts to reland https://github.com/flutter/flutter/pull/126848

This was reverted because it made some unexpected changes to our perf measurements. After landing https://github.com/flutter/flutter/pull/127900, we have much less noise in our benchmarks, so I'd like to reland this and see if there is still a significant measurement difference.
2023-06-08 22:25:40 +00:00
joshualitt
3001d6ab17
Revert "Migrate benchmarks to package:web" (#127207)
Reverts flutter/flutter#126848

Triggered some kind of measuring discrepancy / performance regression.
2023-05-19 10:20:44 -07:00
joshualitt
4fea3ef588
Migrate benchmarks to package:web (#126848) 2023-05-18 14:02:12 -07:00
Mouad Debbar
28f3037758
[web] Use plain platform views in benchmarks (#126080)
Removing the dependency between web benchmarks and `url_launcher`'s `Link` widget.
2023-05-05 14:17:34 +00:00
Mouad Debbar
0fa15e04ac
[web] Add benchmarks for the Material3 Components screen (#124354)
[web] Add benchmarks for the Material3 Components screen
2023-04-11 19:59:37 +00:00
Harry Terkelsen
03f1d37935
Add a benchmark for a scrolling list of Links (#94638) 2022-02-03 14:38:58 -08:00
Mouad Debbar
c2f6a3af91
[web] Stop using web experiments in benchmarks (#94739) 2021-12-06 10:14:06 -08:00
Yegor
4dd56df426
[web] add image decoder benchmark (#93174) 2021-11-08 15:23:08 -08:00
Ian Hickson
f90b019c68
Enable prefer_relative_imports and fix files. (#91573) 2021-10-11 10:28:07 -07:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be24.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Darren Austin
37bc722339
Migrate dev/benchmarks/macrobenchmarks to null safety. (#85501) 2021-06-29 11:49:27 -07:00
Anis Alibegić
c99ed373b3
Fixed large amount of spelling errors (#83744) 2021-06-02 10:14:06 -07:00
Yegor
ccada2704c
[web] run all text layout benchmarks in CanvasKit mode (#83718) 2021-06-01 13:54:02 -07:00
Yegor
5b6444f317
[web] benchmark and optimize defaultTargetPlatform (#75037) 2021-02-02 09:34:01 -08:00
Ferhat
ebd794a137
[web] Add wrapbox scroll benchmark (#70966) 2020-12-02 08:30:42 -08:00
Ferhat
40b4d2badc
Add PageView benchmark (representative of full screen CustomPainter) (#69990) 2020-11-06 18:49:03 -08:00
xster
3302a12b20
Let Flutter SDK use cupertino_icons 1.0.0 (#65087) 2020-10-16 22:36:01 -07:00
Dan Field
33fb35e951
Add benchmark/test for drawing images across frames (#67176) 2020-10-02 16:41:49 -07:00
Tong Mu
87617e4cc3
New benchmark: bench_mouse_region_mixed_grid_hover (#63808)
* Adds a new web benchmark bench_mouse_region_mixed_grid_hover
2020-09-11 18:05:15 -07:00
Tianguang
ce1cfbe71d
Add remaining benchmarks (#62906) 2020-08-05 09:31:08 -07:00
Yegor
744a169387
Add a benchmark that focuses on Paint object performance (#60939)
* Add a benchmark the focuses on Paint object performance
2020-07-10 17:50:24 -07:00
Tianguang
02f8e02880
Add Web Benchmarks for Flutter Gallery (Flutter Side) — 1/4 (#57576) 2020-06-24 10:28:03 -07:00
Tong Mu
65b1956005
Add benchmark for Mouse region (web) (#59803) 2020-06-19 13:48:04 -07:00
Yegor
1a9530af8a
benchmark updating many child layers (#58513)
* benchmark updating many child layers
2020-06-02 17:59:41 -07:00
Yegor
be5b5c898c
add a backward variant of BenchCardInfiniteScroll (#58140) 2020-05-28 12:28:17 -07:00
Ferhat
1fa90ecc2a
[web] Add path construction benchmark (#57016)
* Add path construction benchmark

* Fix analyzer warnings

* Split file into test+generated code. Add comment

* Add license to new file

* remove unused import
2020-05-14 12:35:20 -07:00
Yegor
874b2e58b8
add web benchmark that measures efficiency of clipped out pictures (#56596) 2020-05-08 09:51:52 -07:00
Yegor
54cdc26afb
add benchmark for picture recording (#54908) 2020-04-16 14:46:41 -07:00
Yegor
a30c46dc79
Remove outliers in Web benchmarks to reduce noise; add visualization (#54883)
* web benchmarks: separate outliers to reduce noise; add visualization
2020-04-16 14:39:18 -07:00
Yegor
4e3cf198e8
disable tracing for non-frame based benchmarks (#54236) 2020-04-08 09:17:03 -07:00
Yegor
29c88081b9
Collect chrome://tracing data in Web benchmarks (#53879)
Collect chrome://tracing data in Web benchmarks
2020-04-03 15:10:39 -07:00
Yegor
0d07788069
Add benchmark reproducing large static scrolling content (#53686) 2020-04-01 00:41:02 -07:00
Mouad Debbar
45a8b3db81
complete text layout benchmark (#53295) 2020-03-27 14:56:02 -07:00
Mouad Debbar
af21e74fef
[web] Write benchmarks to measure canvas-based text layout (#52434) 2020-03-24 22:10:25 -07:00
Mouad Debbar
5bb552270d
[web] Add benchmarks for text layout (#51663) 2020-03-10 18:46:03 -07:00
Yegor
bae79599c2
add docs about writing/running web benchmarks (#50989)
* add docs about writing/running web benchmarks

* explain how to run like devicelab

* add WidgetBuildRecorder docs
2020-02-28 10:16:35 -08:00
Yegor
cd0fbd3205
improve web benchmark error reporting (#51490) 2020-02-28 10:14:22 -08:00
Yegor
d95a1a70a2
add WidgetBuildRecorder for benchmarking building widgets (#51088) 2020-02-24 16:08:40 -08:00
Harry Terkelsen
29306b0896
[Web] Add Material Card Infinite Scroll benchmark (#51005)
* [Web] Add Material Card Infinite Scroll benchmark

Adds a benchmark that makes an infinite list of Material cards
and scrolls it. This benchmark exercises more heavyweight rendering
like shadows and clipping and paths.

* Fix analyzer warnings. Respond to comments
2020-02-20 11:16:58 -08:00
Yegor
423459da18
Initial web benchmark harness and 3 benchmarks (#49460)
Initial web benchmark harness and 3 benchmarks
2020-01-30 14:19:17 -08:00