Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timing analytics for debugger page load #3346

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/devtools_app/lib/src/debugger/codeview.dart
Expand Up @@ -114,6 +114,7 @@ class _CodeViewState extends State<CodeView>
horizontalController.dispose();
widget.controller.scriptLocation
.removeListener(_handleScriptLocationChanged);
_shownFirstScript = false;
kenzieschmoll marked this conversation as resolved.
Show resolved Hide resolved
super.dispose();
}

Expand Down
10 changes: 10 additions & 0 deletions packages/devtools_app/lib/src/debugger/debugger_screen.dart
Expand Up @@ -80,10 +80,13 @@ class DebuggerScreenBodyState extends State<DebuggerScreenBody>

DebuggerController controller;

bool _shownFirstScript;

@override
void initState() {
super.initState();
ga.screen(DebuggerScreen.id);
_shownFirstScript = false;
}

@override
Expand All @@ -97,6 +100,7 @@ class DebuggerScreenBodyState extends State<DebuggerScreenBody>

@override
void dispose() {
_shownFirstScript = false;
kenzieschmoll marked this conversation as resolved.
Show resolved Hide resolved
super.dispose();
}

Expand All @@ -114,6 +118,12 @@ class DebuggerScreenBodyState extends State<DebuggerScreenBody>
return ValueListenableBuilder(
valueListenable: controller.currentParsedScript,
builder: (context, parsedScript, _) {
if (scriptRef != null &&
parsedScript != null &&
!_shownFirstScript) {
// TODO(annagrin): mark end of IPL timing for debugger page here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fyi @annagrin to dispatch an event dwds can listen for as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am adding ext.dwds.sendEvent service extension to dwds, it will expect an event { 'type': 'DevtoolsReady', 'payload': {} } .

See dart-lang/webdev#1404

_shownFirstScript = true;
}
return CodeView(
key: DebuggerScreenBody.codeViewKey,
controller: controller,
Expand Down