-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Few fixes and additional API's for performance metrics instrumentation #9179
Conversation
window.fetch(request).then(response => { | ||
_inflightRequestCount = Math.max(_inflightRequestCount - 1, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the max
there to handle double-decrements in case both an error handler and .cancel() are called? Would doing something id-based be more reliable?
const reqId = nextId++;
activeRequests[reqId] = true;
delete activeRequests[reqId];
infLightRequests = Object.keys(activeRequests).length;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that is correct! I thought about that too, but I was trying to keep the instrumentation as low runtime overhead as possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this waiting on anything besides the render test?
src/style/style.js
Outdated
* Apply queued style updates in a batch and recalculate zoom-dependent paint properties. | ||
* | ||
* @param parameters | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an automatic linting change but the comment is misaligned now.
This reverts commit 48f5b5a.
23a5ab4
to
fdb251f
Compare
|
Do we still need this @arindam1993 ? |
Looks like this is stale now — let's revisit later if it's still relevant. |
This is a follow up of #9035, with a few fixes and some additional API methods that help improve the reliability of collected metrics.
Primarily this adds 3 new methods:
map.style.disableFetchCancellation()
/map.style.enableFetchCancellation()
: This lets the test-runner disable request cancellation for acache-prewarm
run, which is run prior to the actual measurement runs. This ensures that all possible tiles that are required for the run are precached during the actual measurement run.map.style.getNumInflightRequests()
: This is used by the test-runner to wait until all in-flight requests are finished for acache-prewarm
run, again ensuring maximum cache-warmth. 🔥Launch Checklist