[Reland] Migration for the sendTiming events for package:unified_analytics (#139299)
Relanding based on this comment: - https://github.com/flutter/flutter/pull/139278#issuecomment-1832951108 Related to tracker issue: - https://github.com/flutter/flutter/issues/128251 <img width="278" alt="image" src="https://github.com/flutter/flutter/assets/42216813/cee7b9be-48d6-48e5-8c39-de28d0a1f0de"> The image above shows all of the instances where we have `sendTiming`. All of the call sites have been updated to use the new `Event.timing` event from `package:unified_analytics`.
This commit is contained in:
@@ -150,11 +150,17 @@ class WebBuilder {
|
||||
settings: buildSettingsString,
|
||||
));
|
||||
|
||||
final Duration elapsedDuration = sw.elapsed;
|
||||
_flutterUsage.sendTiming(
|
||||
'build',
|
||||
compilerConfig.isWasm ? 'dart2wasm' : 'dart2js',
|
||||
Duration(milliseconds: sw.elapsedMilliseconds),
|
||||
elapsedDuration,
|
||||
);
|
||||
_analytics.send(Event.timing(
|
||||
workflow: 'build',
|
||||
variableName: compilerConfig.isWasm ? 'dart2wasm' : 'dart2js',
|
||||
elapsedMilliseconds: elapsedDuration.inMilliseconds,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user