Unverified Commit f5b0f0a2 authored by Kevin Moore's avatar Kevin Moore Committed by GitHub

Report web compiler used with `buildEventSettings` (#125092)

Fixes https://github.com/flutter/flutter/issues/125085
parent c74cf4ba
......@@ -126,6 +126,13 @@ class WebBuilder {
} finally {
status.stop();
}
BuildEvent(
'web-compile',
type: 'web',
settings: 'wasm-compile: ${compilerConfig.isWasm}',
flutterUsage: _flutterUsage,
).send();
_flutterUsage.sendTiming(
'build',
compilerConfig.isWasm ? 'dart2wasm' : 'dart2js',
......
......@@ -82,6 +82,16 @@ void main() {
// Runs ScrubGeneratedPluginRegistrant migrator.
expect(logger.traceText, contains('generated_plugin_registrant.dart not found. Skipping.'));
// Sends build config event
expect(testUsage.events, unorderedEquals(<TestUsageEvent>[
const TestUsageEvent(
'build',
'web',
label: 'web-compile',
parameters: CustomDimensions(buildEventSettings: 'wasm-compile: true')
),
]));
// Sends timing event.
final TestTimingEvent timingEvent = testUsage.timings.single;
expect(timingEvent.category, 'build');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment