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

fix: associate network info with each step #154

Merged

Conversation

vigneshshanmugam
Copy link
Member

@vigneshshanmugam vigneshshanmugam commented Dec 1, 2020

  • part of capture more network information to improve waterfall #152
  • Associate the network information with each step as its required for the waterfall chart creation
  • fix the timestamp information as it was pointing to the journey end timestamp as opposed to the step start/end timestamp
  • Move start/end in favor of requestSentTime/loadEndTime as its when events are written and not the actual duration.
    /cc @Kerry350

@@ -78,6 +79,11 @@ export class PluginManager {
return this.plugins.get(Type.name) as T;
}

onStep(step: Step) {
this.get(BrowserConsole) && (this.get(BrowserConsole)._currentStep = step);
Copy link
Member Author

Choose a reason for hiding this comment

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

Will replace this with EventEmitter at some point if we require more integration between runner and plugins.

@apmmachine
Copy link

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #154 opened

  • Start Time: 2020-12-01T12:46:45.452+0000

  • Duration: 17 min 22 sec

Test stats 🧪

Test Results
Failed 0
Passed 45
Skipped 0
Total 45

url,
request,
type,
method,
start: timestamp,
requestSentTime: timestamp,
Copy link
Member Author

@vigneshshanmugam vigneshshanmugam Dec 1, 2020

Choose a reason for hiding this comment

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

This change was done after some investigation with the chrome network events and how we will use it in the waterfall. copy pasting from internal gist

So here is the gist that i found and we need to change

  • we will use requestTime for the waterfall stuff
  • start/end represents the timestamp of when request is sent and when request completed, so we can calculate the queue time as follows
const queuedTime = payload.response.timing.request_time - payload.response.start
if (queuedTime > 0) {
 // convert in ms and use it in waterfall
}
  • we discard end timing for now as its no useful. Also i think we can rename it to something like requestStartTime and responseEndTime to make it easier

@Kerry350 is aware of this issue.

Copy link

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Thanks for making things easier here 🙏

Comment on lines +51 to +52
requestSentTime: number;
loadEndTime: number;
Copy link

Choose a reason for hiding this comment

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

Much clearer 👍

@vigneshshanmugam vigneshshanmugam merged commit 0851cb0 into elastic:master Dec 2, 2020
@vigneshshanmugam vigneshshanmugam deleted the fix-network-timestamp branch December 2, 2020 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants