-
Notifications
You must be signed in to change notification settings - Fork 574
POC UVloop tracing, support for DNS traces #144
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This MR aligns the uvloop code to become compatible, not production ready, with PY37 adding the following changes: - Support for the new API used behind the `set_debug` function. - Adds the `context=None` kw to those functions that will receive it when uvloop runs with PY37. - Former asyncio.test_utils moved as an uvloop test resource.
This is the first PR that implements POC that gives to uvloop the capacity of emit traces that later can be collected by the upper layers. What does this commit implement? - DNS trace events triggered by the calls to the `getaddrinfo` loop method. - The enabler and disabler context manager called `tracing`. - The collector interface used to gather the trace events called `TracingCollector. This POC assumes that the caller is the last responsible implementing a context that isolates calling to traces that belong to different tasks. Missing pices in this PoC: - Allow many collectors at a time. - The exceptions have to be propagated at tracing level? perhaps, what should we do when there is an exception and we have to call to `dns_request_end` ? right now a `None` is passed as argument
This trace will help us to measure the cost of having a tracing system taking into account that this trace does not entail any IO operation under the hood.
Closing this PR, I'm more interested in open one the MR once #138 gets merged, so not having this full of useless commits. Also, I would prefer to make it in a specific branch for tracing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please note that this PR sits on top of this one #138, so skip changes related to give support for Python 3.7.
Also, we could consider creating an ad-hoc branch to don't pollute the master brancgh, if you consider that we can move ahead and the iterations will be done in many small MR, that might leave the code in an inconsistent status.
This is the first PR that implements POC that gives to Uvloop the
capacity of emit traces that later can be collected by the upper layers.
What does this commit implement?
getaddrinfo
loopmethod.
tracing
.TracingCollector
.This POC assumes that the caller is the last responsible implementing
a context that isolates calling to traces that belong to different
tasks.
Missing pieces in this PoC:
should we do when there is an exception and we have to call to
dns_request_end
? right now aNone
is passed as an argument.Example of the code that uses the current POC
What I would like to implement in the next step:
nothing of the default method.
As an example of the previous snippet with the missing features implemented: