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

misc(logging): add hanging request logging in driver #6297

Merged
merged 3 commits into from
Oct 17, 2018

Conversation

patrickhulce
Copy link
Collaborator

Summary
Adds --verbose logging of the URLs or DCL event that we're currently waiting on.

Related Issues/PRs
#6272

@@ -484,6 +485,28 @@ class Driver {
const networkStatusMonitor = this._networkStatusMonitor;

const promise = new Promise((resolve, reject) => {
const logStatus = () => {
Copy link
Member

Choose a reason for hiding this comment

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

can you add a comment to explain what this is for?
the name doesnt totally help, but i agree the name should remain this short. :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done :)

@patrickhulce patrickhulce merged commit 43c5ee1 into master Oct 17, 2018
@patrickhulce patrickhulce deleted the log_hanging_reqs branch October 17, 2018 01:15
Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

oh, I was too late :)

// Wait until it calms down a bit to be a little less spammy.
if (inflightRecords.length < 20) {
for (const record of inflightRecords) {
log.verbose('Driver', `Waiting on ${record.url.slice(0, 120)} to finish`);
Copy link
Member

Choose a reason for hiding this comment

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

we should probably remove all the network busy, network semi-quiet logs in NetworkRecorder. At least I've never found them useful, and this will give equivalent info (except fully quiet, I guess)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FWIW I still found them helpful to track exactly when the idle timeout would be started and cancelled (and to break up the repeated sets of URLs when filtering out the '<= event:verbose' events which are the real crazy chatty ones!), but agreed the wall of them every time we call recordsFromLogs is super annoying.

return;
}

const inflightRecords = networkStatusMonitor.getInflightRecords();
Copy link
Member

Choose a reason for hiding this comment

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

i've been a little concerned about the length of our NetworkRecord callbacks. I was seeing 1+ms for some while doing some OYB profiling a while back, and there are a lot of callbacks.

Can we detect whether or not we're in verbose mode before doing any of this work? Short of settings in here or changing lighthouse-logger again, I'm not sure there is, sadly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

+1 to this and another lighthouse-logger change, I want one level in between verbose and default (debug or info perhaps?) that doesn't contain every protocol message

Copy link
Member

Choose a reason for hiding this comment

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

Good call. Yah not showing events from Network domain would be my number one request.

@brendankenny brendankenny mentioned this pull request Oct 17, 2018
2 tasks
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.

None yet

3 participants