flutter/packages
auto-submit[bot] 8df62188f0
Reverts "Use coverage.collect's coverableLineCache param to speed up coverage" (#137121)
Reverts flutter/flutter#136851
Initiated by: CaseyHillers
This change reverts the following previous change:
Original Description:
One of the reasons gathering coverage information is expensive is that we have to force compile every function in the libraries we're interested in. Without this, functions that haven't been invoked (so haven't been compiled) won't have any line number information, so the coverage tool doesn't know which lines to add to the list of misses. In flutter's case, the test infra spawns many VMs, and each of these needs to recompile all those libraries.

To fix this, we need a way of skipping force compilation for libraries we've already seen in previous tests, without losing the information about which lines in each library are coverable. So I [added](https://github.com/dart-lang/coverage/pull/466) the `coverableLineCache` to `coverage.collect` in package:coverage v1.7.0. This cache starts out empty, but fills up with lists of all the lines that are coverable for every library as coverage is gathered. package:coverage can then tell the VM not to force compile any libraries in this cache (using `getSourceReport`'s `librariesAlreadyCompiled` param). So the first test suite will still have to compile everything, but subsequent test suites will be much faster.

This speeds up coverage collection significantly, for large test suites:

| Running flutter/packages/flutter tests... | Time | Overhead |
| --- | --- | --- |
| without coverage | 8:53 | - |
| with coverage | 20:25 | 130% |
| with `coverableLineCache` | 12:21 | 40% |

Bug: https://github.com/flutter/flutter/issues/100751
2023-10-24 02:38:27 +00:00
..
flutter Upgrade packages in flutter and flutter_test. (#137106) 2023-10-23 16:20:32 -07:00
flutter_driver Roll pub packages (#136924) 2023-10-20 20:36:29 +00:00
flutter_goldens GoldenFileComparators should dispose created Image objects. (#136716) 2023-10-17 15:25:52 -07:00
flutter_goldens_client Bump file,process,process_runner (#136418) 2023-10-12 13:05:24 -07:00
flutter_localizations Removed TBD translations for optional remainingTextFieldCharacterCounZero message (#136684) 2023-10-17 10:34:49 -07:00
flutter_test Upgrade packages in flutter and flutter_test. (#137106) 2023-10-23 16:20:32 -07:00
flutter_tools Reverts "Use coverage.collect's coverableLineCache param to speed up coverage" (#137121) 2023-10-24 02:38:27 +00:00
flutter_web_plugins Allow latest pkg:material_color_utilities (#132445) 2023-10-11 23:57:16 +00:00
fuchsia_remote_debug_protocol Roll pub packages (#136924) 2023-10-20 20:36:29 +00:00
integration_test Roll pub packages (#136924) 2023-10-20 20:36:29 +00:00
analysis_options.yaml